GA Event Tracking Code for an Email Newsletter Signup

Ever wish you could easily track how many people have signed up for your newsletter without having to log in to an ESP like Campaign Monitor? You can actually tag your newsletter links in Google Analytics to count any click on your signup button as an event. Then you’ll be able to easily measure which blog posts lead to the most signups. Use the form to build GA Event tracking code for a newsletter signup, then add the code to the link to track the event.


Universal Event Tracking Code Builder for a Newsletter Signup

(The name you supply for the group of objects you want to track. We recommend using something like “email”):

(Used to define the type of user interaction. We recommend using something like “signup”):

(Optional. Recommend using something to describe the location of the signup link (e.g. “Sidebar”)):

(Optional. If you’d like to assign a numeric value to your signup, enter that value here):

(Optional. Select “true” if you want to consider it a bounce when a visitor views one page, submits a contact form and leaves without viewing any other pages.)


Place the following code within the code of your signup link:

It should look something like this for your signup button:


Optional Goal Setup

After you add the newsletter signup event tracking code to your site, you may want to setup a goal in Google Analytics that's related to the event. Follow these instructions to setup the goal.

  1. Login to Google Analytics and click on Admin in the main navigation.
  2. Select the Account and Property where you want to create the goal. Under the View list, click on Goals
  3. Click on the New Goal button, click on the Custom radio button and then click on the Next step button.
  4. Name the goal and select the Event radio button.
  5. Populate all of the relevant goal details (in bold):
    • Category | that matches |
    • Action | that matches |
    • Label | that matches |
    • Value | that matches |
  6. Click the Create Goal button. You're done!