Custom Pixel Code
The order item object type is:
Running the pixel
Copy the pixel code and use it as a custom js script on your website. Whenever you have a successful order, call theVWPixel function with the following arguments:
orderId: The order IDorderTotal: The order totalorderCurrency: The order currencyorderItems: The order items
Google Tag Manager (GTM)
If you manage your scripts through Google Tag Manager, you can fire the Videowise pixel from a Custom HTML tag that reads the order data from thedataLayer. This is the recommended approach when you don’t have direct access to your theme/template code, or when your order data is already available as a dataLayer event (for example a GA4 purchase event).
The flow has three parts:
- Your store/site pushes a purchase event with the order data to the
dataLayer. - A GTM trigger listens for that event.
- A GTM Custom HTML tag runs the
VWPixelfunction using values read from thedataLayer.
1. Push the order data to the dataLayer
On your order confirmation / thank-you page, push an event to thedataLayer as soon as the order is successful. Make sure window.dataLayer is initialized before the GTM snippet runs.
2. Create the data layer variables
In GTM, create Data Layer Variables so the tag can read each field:3. Create the trigger
Create a Custom Event trigger that fires on the event name you pushed:- Trigger type: Custom Event
- Event name:
vw_purchase(or your existingpurchaseevent)
4. Create the Custom HTML tag
Create a Custom HTML tag, set it to fire on the trigger above, and paste theVWPixel function (from the top of this page) followed by an invocation that uses the GTM variables:
GTM variable references like
{{DLV - orderId}} are replaced with their actual
values when the tag runs. String values are inserted with surrounding quotes
automatically, while objects/arrays (such as orderItems) are injected as JSON,
so they don’t need extra quotes.