Request For Tutorial Video: FB Pixel Purchase Event & GA Enhanced E-commerce Tracking

Hi Shan,

If you want to correctly track page views using GTM, I recommend that you use the ‘Custom Event’ Trigger.

In short, every time a new page is loaded, Wix will fire a ‘Custom Event’ to GTM with the name ‘Pageview’.
To track this event, you need to create a new trigger of Type ‘Custom Event’ as shown in the gif below.

Then, instead of selecting ‘All Custom Events’, select ‘Some Custom Events’ and add the condition in which you want the event to fire. In your case, you can use the ‘Page Path’ condition with the same URL string as in the video you posted.

Sending Additional parameters with events :
If you want to include additional information when you send data to facebook, you will need to collect that information in GTM Variables and then inject the variable into the FB tag that’s connected to your trigger.

This is doable but not that simple. The easiest way to do this, in my opinion, is to utilize Wix Code and the capabilities that are covered in the video Kobi Shared with you above.

By creating a custom event in Wix Code using the trackEvent API, you can create new ‘Custom Events’ to your GTM data layer. These are easy to use as variables because they are included in your data layer.

I will show you an example.

Lets say you want to track a custom purchase event on your site and you want to include the price, which appears in your page’s content.

The first step is to create a custom event using Wix Code.
In the screenshot below, I created a custom event that is set to load when the page is loaded.
The event includes the price for the purchase, which in this example, is grabbed from a text component on the page.

When the page is loaded, this event will be sent to the GTM data layer and you can use it as a trigger to your purchase event instead of using the ‘Pageview’.

To grab the price from this event, you need to create a new variable of type ‘Data Layer Variable’. This variable will grab the ‘price’ value from the data layer, which in this example is ‘65’.

The variable will look like the screenshot below and we’ll name it ‘Custom Price’

Then, we can use the ‘Custom Price’ variable in your FB tag like this:

Finally, you can see that the event is correctly sent to FB when the page is loaded:


That’s it.
Let me know if you have any further questions.

Thanks,
Adam