How do I track clicks on a popup?
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?
Re: How do I track clicks on a popup?
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