Knowledge Base      


How do I add tracking pixels or JavaScript code to Wix?


Caution: Wix’s built in tracking code feature has known bugs. For this reason, we recommend adding your tracking codes to Wix using the GTM (Google Tag Manager) integration. Follow the steps below to learn how to set this up.


In this article, we’re going to show you where to install tracking pixels and tracking code in Wix. But, before you read further, if you don’t already have a good understanding of where to install tracking pixels on an HTML page, the rest of this document will make more sense if you review this article first:
 
What are tracking pixels and tracking code?


Step 1 – Create a Container in GTM

Go to Google Tag Manager here and create an account and container. Your target platform will be “Web” when the prompt asks for it.

If you already have a GTM account and container, you can skip this step.


Step 2 – Integrate GTM with Wix

In Google Tag Manager, copy your container ID.

 


Next, in Wix, go to “Settings”, then “Marketing Integrations”.

 


Click on “Connect” under “Google Tag Manager”.

 


Finally, add your Container ID and hit “Save”.


Step 3 – Set Up Your Tracking Codes in GTM

Back in GTM, add a new tag.

 


Add a new tag configuration and select “Custom HTML” as the type.

 


Paste in the tracking code you’d like to add to your page.

 


Finally, we’ll add a “Trigger”. This is what tells GTM what pages to add the code to.

Click on the “Triggering” box to add a new trigger. Then click on the “+” icon to add a new custom trigger.

 


Finally, select “Page View” as the Trigger Type. Choose “Some Page Views”, then select “Page URL” and “Contains”. 

In the right hand box, add in the unique part of the page URL you want to add this code to. For example, if the we wanted to add our code to https://yourlandingpage.com/dog-subscription-box/, then you’d enter “/dog-subscription-box/”.

This is shown in the example below:

 


That’s it! Google Tag Manager will add this code to whichever page(s) you choose in the trigger.

Repeat this process for any different codes you need to add to other pages.

If you want to add the same code to multiple pages, just click the “+” icon under the trigger and add the URLs of your other pages.

Article 673 Last updated: 06/02/2024 9:58:09 PM
https://www.clickmagick.com/kb/?article=673