Dynamic Product Ads: Tag Implementation for a Search Result Page

Dynamic Product Ads use LiveConnect to capture shopper behavior on your website for the purpose of informing data-driven ads in LiveIntent inventory.  The insights collected include products views, shopping carts, and purchases.  These intent insights power dynamic ad creative for customers with products they have interacted with, or relevant up-sells and cross-sells. LiveIntent calculates the best product to display to each individual customer, with the goal of efficiently producing a conversion.

LiveIntent is able to accomplish this via our LiveConnect Tag, in conjunction with your website's product feed.  LiveConnect loads asynchronously and does not influence page load times or other aspects of the user experience of your website.

 

Time for Completion: 10 minutes

 _____________________________________________________________________________

Instructions

The basic script is loaded asynchronously on the page and will not block the page from finishing its load. The link to the script connected to your account will be handed over by your account representative.

The script should be placed in the header section of your homepage.

 

Basic setup for a search result page

<script type="text/javascript" src="//b-code.liadm.com/a-xxxx.min.js" async="true"></script>
<script type="text/javascript">
window.liQ = window.liQ || [];
window.liQ.push(
 { event: "setEmail", email: "user@example.com"},
 { event: "viewSearchResult", currentPage: 1, searchTerm: "brown shoes men", itemIds: ["3983rjk2jr432r", "9384jhrnf3rf34", "3049309rifeif3"] }
);
</script>

Required

{ event: "viewSearchResult", currentPage: 1, searchTerm: "brown shoes men", itemIds: ["3983rjk2jr432r", "9384jhrnf3rf34", "3049309rifeif3"] }
event static string, "viewSearchResult"
currentPage Number, the page number of a category listing or -1 if not available
searchTerm String, search term that was entered
itemIds Array, contains the product IDs of the current page, those IDs need to match with the product IDs we receive from the product catalog feed.

Optional

{ event: "setEmail", email: "user@example.com" }
{ event: "setHashedEmail", hashedEmail: "169003b1f9b7897147ddf7008e3ff649" }
  • You can send the setEmail or setHashedEmail event at any time. Not only on a page view, but also when a form is submitted. 
  • SetEmail is expecting an unencrypted email address. The tag makes sure that LiveIntent will only receive an encrypted email address as a hash. LiveIntent will never receive plain text email addresses.
  • SetHashedEmail is expecting to have a trimmed and all lower case email address before encrypted into a hash. If you don't lowercase and trim the email address before encryption, this will result in the inability to target the user or make them part of the targetable retargeting segment. For example: The encrypted hash of User@example.com results in a different hash value than user@example.com.
Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk