Analytics
2.7K members online now
2.7K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

How do I track clicks on a popup?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

We would like to track how many users click on a popup we have implemented that asks a few questions and helps them find the right product based on their answers. (https://i-love-my-pillow.myshopify.com/collections/products - the button that says "Click here to be fitted for the right pillow"). 

 

How do we set up event tracking so we can see how many users are using this feature?

 

Thanks

1 Expert replyverified_user

Re: How do I track clicks on a popup?

Top Contributor
# 2
Top Contributor

Hi,

 

You can track the button clicks as events in Google Analytics. You need to modify the button code so it includes the command for sending the event when it's clicked.

<button class="pillow-chooser-trigger" onclick="$('#fcb-link').trigger('click');ga('send', 'event', 'popup', 'clicked');">Click here to be fitted for the right pillow</button>

Also I noticed that your site is sending duplicate pageviews to GA, this happens because both the old ga.js and the new analytics.js tracking codes are installed and both are sending hits to the same property. You need to remove the old tracking code.

 

Hope this helps, let me know if you have questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

How do I track clicks on a popup?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

This worked, thank you!