You can track popups with Google Analytics event tracking. This snippet of code may be added to an existing popup or a new one. Learn how by following the below steps.
Navigate to Content > Content Web Content > click the name of the custom popup to begin editing.
Within the Design tab > Signup section > Locate the Input HTML Tag that is tied to the actionable element on the popup.
Add the following attribute to the element that a shopper clicks to submit the popup:
onClick="ga('send', 'event', 'Popup', 'click', 'Submit Button');".
This code translates to:
Send: Defines call as hit
Event: Hit Type
Popup: Event Category
Click: Event Action
Submit Button: Event Label
The Event Category and the Event Label can be modified to what you would like to show in Google Analytics for this Event.
If you don't see the code demonstrated above, you may be using a different version of Google Analytics. By searching through the page source, you can determine the version of Google Analytics you are currently using by following the below steps:
Navigate to your website.
Right-click on the page.
Select View Page Source.
Enter Control + F.
Search for: ga.js or analytics.js.
If you have ga.js, use this tracking code: onclick="_gaq.push(['_trackEvent', 'Click', 'Popup', 'Submit Button']);"
If you have analytics.js, use this tracking code: onClick="ga('send', 'event', 'Popup', 'click', 'Submit Button');"
VIEWING THE EVENT TRACKING IN GOOGLE ANALYTICS
1. Log into your Google Analytics Account at analytics.google.com
2. Navigate to Reporting.
3. Scroll to Behavior on the left-hand side.
4. Go to Events.
5. Then Overview.
6. Select a date range from the drop-down menu in the right-hand corner.
You will now see the tracked events from popup submissions.