Adding Facebook or Google Analytics tracking scripts to the signup form

Some stores want to be able to track events in the popup signup form. For example, they want to track when a customer clicks the submit button in the sign up form and record the event in Google Analytics or Facebook.
You can have a tracking script included in the signup form by sending the script to  [email protected]. Include the name of the store and request the script is added to the signup form.
The script you supply will be loaded into the `` element of the signup form.
The code you supply will need to include loading the tracking script as well as recording the event. Because the signup form is rendered inside an iframe it cannot rely on the tracking script being loaded in the main page. The tracking  script must be loaded into the iframe as well. 
Here’s an example of a Facebook tracking script that might be supplied:



This this includes loading the Facebook tracking library (this is the section before fbq(... and then recording the event (everything from fbq(... onwards. ( FB_PIXEL_ID would be replaced by our own Facebook pixel id).
Here’s the same script again that includes tracking the submit button being clicked:



Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us