Narrativ Advertiser Tag¶
The Narrativ advertiser tag allows Narrativ to track user behavior on an advertiser’s site. Our auction system optimizes advertiser acquisition and ROI by analyzing data on page views and purchase behavior. No Personal Identifying Information (PII) is captured. The tag runs asynchronously in the background so there is no impact to page load times.
We track two types of events for our partners - check outs and page views:
- Place the check out tag on the page that loads after your customer has finished shopping and paid for their purchase (your site’s equivalent of a “Thank you for your order” page).
- Place the page view tag on every other page that loads during your user’s journey, so that we can empower you with data on what products they are looking at before they check out. Important! Replace “ACCOUNT NAME” with your Narrativ account name in all snippets. Reach out to email@example.com for help with your Narrativ account name as needed.
Adding Information About Your Checkout Page¶
|page_type||string||Required. Must be “checkout” to tell the tag to fire a checkout event.|
|user_id||string||Optional. The ID the user has in your system, if available.|
|order_id||string||Required. The unique order_id for the checkout that just completed.|
|order_value||float||Required. The total purchase price of the order.|
|currency||string||Required. The three digit code for the currency that order_value is in (ex: ‘USD’). Uses ISO 4217|
|products_purchased||array||Required. An array of Product objects representing the purchased items, as defined below.|
|product_id||string||Required. The unique identifier for this product.|
|product_name||string||Required. The name of the product.|
|product_category||string||Optional. The Google category of the product.|
|product_brand||string||Optional. The brand of the product.|
|product_price||float||Required. The price of the product.|
|product_quantity||integer||Required. The number of this product purchased in this order.|
Full Example (remember, replace “ACCOUNT NAME” with your Narrativ account name)
Adding Information for the Page View Tag¶
The page view tag goes on every page except for pages with PII. Remember to change “ACCOUNT NAME” to your Narrativ account name.
Google Tag Manager Walkthrough¶
Below is a walkthrough for implementing the Narrativ pixel using a “Custom HTML” tag in Google Tag Manager. Start by navigating to your Google Tag Manager Dashboard.
- Select “Tag Configuration” to begin making a new pixel.
- Select “Custom HTML” to open a text field to copy and paste the above code. Make sure you replace “ACCOUNT NAME” with your Narrativ account name.
- Enter the code from the “Page View Tag” snippet (See the section before this). Replace the content of “BAMX_EVENT_DATA” with the relevant data from your data layer.
- Select “All Pages” as the correct trigger for this “Page View Tag.”
- Name the Tag “Narrativ Page Impression” and double check that the trigger is set to “All Pages”
- For the “Check Out Pixel”, create a new tag and open the text field.
- This example is using a dummy data layer. You will have to customize “var purchased” to point at how you access the order content in your data layer.
- Add box under “Triggering” to add a trigger for this tag.
- If you don’t already have a trigger for checkout pages, then it’s easy to create one!
- The below example has a series of triggers based off of common URL types for checkout or confirmation pages. (E.g. narrativ.com/checkout/ will trigger the “Checkout Page” option). Replace “checkout” with whatever word your site uses on checkout pages. Remember, you only need one trigger!
- Double check the tag name, make sure you’ve updated the code with the information on your checkout page, and make sure you’ve selected the correct trigger.
- Make sure that the tag(s) are showing up in the “Tag” tab.
- Preview the changes made and fix any errors that pop up in the window.
- Click the “Submit” button to save your changes (this step is not final)
- Double check that everything you worked on is in this submission. Name the submission something like “Adding Narrativ Pixel” so that it’s easy to find if you need to go back and debug any issues in the future.
You did it!!
If you have any issues during this process then reach out to your Narrativ contact or firstname.lastname@example.org