DPA Pixel & Event Tag Implementation

Orla O'Donnell -

Dynamic Product Ad - Pixel & Tag Implementation

Dynamic Product Ads are always-on advertising for direct response marketing, connecting your products to the right person at the right time, at scale and across devices. With StitcherAds, Dynamic Product Ads simplify the process and allow our customers to create more ads in less time directly from the product feed.

You will need to implement a Custom Audience Pixel as well 3 Custom Event Tags (1-3) , there are also 3 further optional Event Tags available (4-6) for more advanced targeting:

  1. ViewContent
  2. AddtoCart
  3. Purchase
  4. Purchase Event with Optional Travel Parameters
  5. Lead Event
  6. Search Event

You will find your specific WCA and Event tags by logging into StitcherAds and Navigating to Settings > Dynamic Product Setup

Website Custom Audience Pixel (WCA)

The following code should be placed in between <head> and </head> on every page on your website.

<!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', 'XXXXXXXXXX'); fbq('track', 'PageView'); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id='XXXXXXXXXX'&ev=PageView&noscript=1" /></noscript> <!-- End Facebook Pixel Code -->

*Note that the XXXXXXXXXX above should be replaced with your WCA pixel ID*

 

View Content Event

Place the following code below the closing script of the Custom Audience Pixel on any page that constitutes a product view.

fbq('track', 'ViewContent', {
 content_ids: ['<product_id>'],
 content_type: 'Either 'product' or 'product_group' based on the content_ids being passed'
});

</script>


Items in orange should be dynamically inserted either using tag management software or directly on the site as follows:
• product_id: '99' - 99 should exactly match the SKU number in your product feed
• content_type: 'product'

Add To Cart Event

Place the following code in the event handler for when a product is added to the cart.

fbq('track', 'AddToCart', {
 content_ids: ['<product_id>'],
 content_type: 'Either 'product' or 'product_group' based on the content_ids being passed'
});

 

Code example of add-to-cart button if it's done through JavaScript / AJAX.


<button onclick="fbq('track', 'AddToCart', { content_ids: ['<product_id>'], content_type: 'Either 'product' or 'product_group' based on the content_ids being passed'})">Add to Cart</button>


Items in orange should be dynamically inserted either using tag management software or directly on the site as follows:
• product_id: '98' - 98 should exactly match the SKU number in your product feed
• content_type: 'product'

Purchase Event

Place the following code below the closing script of the Custom Audience Pixel on your order complete page.

<script>

fbq('track', ‘Purchase’, {
 content_ids: ['<product_id1>', '<product_id2>'],
 content_type: 'Either 'product' or 'product_group' based on the content_ids being passed'
});

</script>

Items in orange should be dynamically inserted either using tag management software or directly on the site as follows:
• product_id1: '98' - 98 should exactly match the SKU number in your product feed
• product_id2: '99' - 99 should exactly match the SKU number in your product feed
• content_type: 'product'

Purchase Event with Optional Travel Parameters

*Please contact member of our success team if you are interested in implementing this this and currently do not have the Travel Parameter code available to you on your account.*

Place the following code below the closing script of the Custom Audience Pixel on any page where a sign up is to be completed, e.g. click on pricing, signup for trial. 

<script>

fbq('track', ‘Purchase’, {
 content_ids: ['<product_id1>'],
 content_type: 'Either 'product' or 'product_group' based on the content_ids being passed'
 destination: 'Destination of the travel',
 flight_type: 'e.g. Round trip or One way',
 hotel_type: 'Type of the hotel or property. e.g. 'Luxury', 'Budget' etc.'
});

</script>

Items in orange should be dynamically inserted either using tag management software or directly on the site as follows:
• product_id1: '98' - 98 should exactly match the SKU number in your product feed
• content_type: 'product'
• destination, flight_type, hotel_type: 'Vadutz, round trip, luxury'
• You can find additional information on travel parameters here.

 

Lead Event

Place the following code in the event handler for when a lead event is triggered, e.g. click on pricing, signup for trial.

<script>

fbq('track', 'Lead', {
 content_name: 'Name of the page/product',
 content_category: 'Category of the page/product',
 value: 'value of a user performing this event to the business',
 currency: 'currency for the value specified',
});

</script>


Items in orange should be dynamically inserted either using tag management software or directly on the site as follows:
• content_name: 'Auto Insurance'
• content_category: 'Quote'
• value: '40.00'
• currency: 'USD'

Search Event

Place the following code in the event handler for when a search is made, e.g. when a product search query is made.

<script>

fbq('track', 'Search', {
 search_string: 'Used with the Search event. The string entered by the user for the search',
 content_category: 'Category of the page/product',
 content_ids: ['<product_id>'],
 value: 'value of a user performing this event to the business',
 currency: 'currency for the value specified',
});

</script>

Items in orange should be dynamically inserted either using tag management software or directly on the site as follows:
• search_string: 'leather sandals'
• content_category: 'Product Search'
• product_id: '98' - 98 should exactly match the SKU number in your product feed
• value: '0.50'
• currency: 'USD'

 

 

Comments

  • Avatar
    Anders Lönnberg

    I have no "Settings" nor "Dynamic Product Setup". I have "Configuration" and under that "Dynamic Product Ads"; is it here I find the WCA ID?

Powered by Zendesk