Event Tracking Code
Events are user interactions with content that can be tracked independently from a web page or a screen load.
Create Event URLTracking URL Builder
The Google Analytics URL Builder generates Google Analytics Tracking Codes to your content.
Create Tracking URLContact Us Today for a Free 1:1 Consultation of Your Digital Marketing Strategy
Contact UsCampaign URL Builder
The Google Analytics Tracking Code allows Google to quickly scan data on each page of your website and send it back to your Analytics report for the best and most accurate data yet.
To find your tracking ID, (UA-XXXXX-Y), click Admin, select Property Settings, then Tracking Info > Tracking Code. You’ll find your tracking ID at the top of the page. Copy and paste your tracking ID into the code generator for your new, updated code.
Where to Place Your Tracking Code:
Copy the OnClick Event code and add it as an “onClick” attribute to the HTML of the page you wish to track clicks.
{{gaCode0}}
{{gaCode1}}
{{gaCode2}}
{{gaCode3}}
{{gaCode4}}
{{gaCode5_1}}{{gaCode5_2}}{{gaCode5_3}}
{{gaCode6}}
{{gaCode7}}
Event Tracking Code
When there is an on-click event that you wish to track (e.g. a contact form submission) but you don’t have a confirmation page to use when setting up your goals, you can still track conversions. To do that, you’ll use Google Analytics’ Universal event tracking onclick scripts. They are easy to set up and give you the flexibility to track almost any “event” on your site that requires a click.
Event tracking is used to record specific interactions users have with individual functions throughout your entire website. For example, track downloads, video plays and blog subscriptions as Google Analytics Events.
Input your desired Category, Action, Label, and Value into the Google Analytics Event tracking code generator to receive your custom snippet. Check out Google’s Help Center for more information about the Anatomy of an Event.
Where to Place Your Tracking Code:
Copy the OnClick Event code and add it as an “onClick” attribute to the HTML of the page you wish to track clicks.
onClick="ga('send', 'event', {{categoryOut}}{{actionOut}}{{labelOut}}{{valueOut}});"
Was This Helpful?
Subscribe to the Newsroom
The best source of information for our customers, clients, guides, and industry best practices. Join us