Custom Pixel Code
The order item object type is:
finalLinePrice is the line total before discount allocations — typically variant.price.amount * quantity, matching Shopify checkout line items. Do not pre-subtract discounts. Pass Shopify discountAllocations on the line; Videowise subtracts them. Allocations whose discountApplication.targetType is SHIPPING_LINE are ignored.
Example orderItems payload:
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 (see theOrderItemtype above, including optionaldiscountAllocations)shippingCosts(optional): Shipping amount. Sent asshipping_costs. Defaults to0taxAmount(optional): Tax amount. Sent astax_amount. Defaults to0
referral is not an argument. The snippet sends it from the reeview_referral cookie. For a mobile app, use trackingPixel — the SDK sets referral with vw_referral_channel: "mobile_app". A custom mobile pixel (no SDK) must send that object itself or the order is not attributed to MOBILE APP. See Live shopping order tracking.
Example:
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.5. Verify
Use GTM Preview mode to place a test order and confirm the tag fires on the purchase event. When it runs successfully you’ll see the following message in the browser console:Related
- Pixel overview
- Custom platforms
- Live shopping order tracking
- Cookies
- React Native SDK — use
trackingPixelin apps instead of this snippet (shippingCosts,taxAmount,discountAllocations, and mobile-appreferral)