Knowledge Base

How to track multiple events

 

In this article, we'll cover how to track different events on your site using the LiveConnect tag.


Track events that matter to you

Event codes lets your organization track specific actions that happen and leverage them for marketing and advertising.

Using the LiveConnect tag, you can build multiple conversion events on a single LiveConnect tag. Now, all campaigns that are associated with a LiveConnect conversion event can leverage the LiveConnect data that is being ingested from your site(s) into LiveIntent’s prediction engine.

Benefits:

  1. Build dynamic audience segments or create a conversion pixel to optimize to different events
  2. Optimize campaigns to different conversions to see what performs best.
  3. Create a full funnel marketing plan optimizing to different conversion events for the same advertiser
  4. Advanced dynamic audience segmentation capabilities
  5. Enables Dynamic Product Marketing

Please Note: With this advanced functionality, physical campaign set up and reporting capabilities remain the same as before. We can only associate one conversion event to a single campaign, can only optimize and report back data based on this one to one assignment.

6 standard events

You can use the 6 events that LiveIntent pre-defines (located further below in this article) to track and optimize ads. Please note that you must install event code on specific pages of your website where the actions will happen.

The 6 standard conversion events include:

  1. View Content
  2. View Search Result
  3. View Category
  4. Add To Cart
  5. Remove From Cart
  6. Conversion

Setting-up & tracking events

Use the table below for instructions on how to build dynamic audience segments or create a conversion pixel to optimize to different events. Copy this event code and paste it on the relevant page of your site.

 

Event Name

Event Description

Parameters

Required Parameters

viewContent

When a key page is viewed such as a product page, e.g. landing on a product detail page

event, email, emailHash, contentType, name, contentId

None. For Dynamic Product Ads; contentId, and content_type are required.

viewSearchResult

When a search is made, e.g. when a product search query is made

event, email, emailHash, searchTerm,currentPage, itemIds

None

viewCategory

When a category page is viewed

event, email, emailHash, name,currentPage, itemIds

none

addToCart

When a product is added to the shopping cart, e.g. click on add to cart button

event, email, emailHash, name,items

None. For Dynamic Product Ads: items are required.

removeFromCart

When product is removed from the shopping cart.

event, email, emailHash, name,items

none

conversion

When a purchase is made or other kind of conversion flow is completed, e.g. landing on thank you/confirmation page

event, email, emailHash, conversionId, name, amount, currency, items

name, email or emailHash
For Dynamic Product Ads; conversionId, amount, currency, items are required.

 

Parameter names & descriptions  

Parameter Name

Parameter Description

event

value of a user performing this event to the business. currently supported: viewContent, viewSearchResult, viewCategory, addToCart, removeFromCart, conversion

email

email address of the users browsing the site if available. Email address gets hashed in the client, before send to the server.

emailHash

Pre-hashed (md5, sha1, sha2) email address of the user browsing the site. Email addresses must be lowercased before hashing.

name

Some string to further distinguish between same kind of events. In the case of a conversion event it’s recommended to use one of those, if appropriate: ‘product_purchase’, ‘email_signup’, ‘form_fill’, ‘download’.

contentType

only needed in the context of the viewContent event to distinguish between different kind of contents being browsed on the site. Valid values are: "LandingPage", "Article", "Product", "Hotel", "Flight", "Destination"

currency

currency for the value specified.

contentId

id that uniquely represents the content being browsed. e.g. a product sku/id, an article Id, etc.

currentPage

number of the page browsed on category or search result pages

searchTerm

either the search term the user was searching for or a cleaned representation of it

itemIds

A list of JSON object that contains the product or content identifier(s) associated with the viewSearchResult or viewCategory event.

items

A list of JSON object that contains the product or content identifier(s) associated with the event as well as quantities and prices of the products. id, quantity, price and currency are the required fields. e.g. [{'id': 'ABC123', 'quantity': 2, 'price': 5.99, 'currency': 'USD'}, {'id': 'XYZ789', 'quantity': 2, 'price': 9.99, 'currency': 'USD' }]. Note that price is the price of a single item, not cumulative price.

conversionId

A string that represents the unique conversion event. In the case of a product purchase usually a transaction ID or order ID, for other kinds of conversions choose appropriately so that it’s possible to differentiate between each single conversion event.

amount

Used with conversion event. Total amount of the purchase/conversion.

About events and names

Events

The “Event” field indicates the general action a visitor is taking on site.

Names

Conversion names enable us to track and optimize towards different actions — whether they’re for email sign-ups, form fills, downloads, product purchases, or anything else their campaigns are responsible for.

Think of the “Name” field as a sub-event.

  • For example, if you wanted to optimize towards email acquisition: Event = Conversion, Name = email_signup. The name field will enable us to use our data in a more intuitive way to better to forecast, analyze and optimize campaigns as we won’t just know that a conversion is occurring, we will know what type of conversion is occurring

Event and name use cases

Conversion Name

Use Cases

product_purchase

After an items been purchased

email_signup

Submitting email for newsletter

form_fill

Creating an account on the site

Information outside of email address (like a phone number or house address)

download

App or whitepaper

Custom

Let your customer success representative know if you want to make use of a custom conversion event name and they will make sure everything will be prepared on or end to work with those.

Example Code

Use case:  You want to simply track a conversion 

Event: conversion - (Generic Example)

Example code: 

window.liQ = window.liQ || [];
window.liQ.push({
"event": "conversion", "name": "conversion_name", "email":"joe@example.com" });

-------  

Use case:  You want to track email signups and retarget those that have visited the page, but have not yet signed up

Event: viewContent

Example code: 

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewContent", "contentType": "LandingPage", "name": "Email-Signup-Form"
});

After adding this event to the landing page of your choice, you'll be able to build an audience of all people that have visited that page. To enable those audiences, talk to your account manager. 

 

Event: conversion 

window.liQ = window.liQ || [];
window.liQ.push({
"event": "conversion", "name": "email_signup", "email":"joe@example.com" });

Add this event to your email signup confirmation page to attribute the conversion accordingly and optimize your campaign. It will also create an audience that can be used for suppression of those successfully converted customers.

-------  

Use case: You're in eCommerce and want to run a Dynamic Product Marketing campaign

Event: viewContent 

Example code:  

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewContent", "contentType": "Product", "contentId": "34878dfdfd"
});

 

Event: viewSearchResult

Example code:  

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewSearchResult" "currentPage": 1, "searchTerm": "brown shoes men", "itemIds": [ "3983rjk2jr432r", "9384jhrnf3rf34", "3049309rifeif3" ] });

 

Event: viewCategory

Example code:  

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewCategory", "currentPage": 1, "name": "Mens Shoes", "itemIds": [ "3983rjk2jr432r", "9384jhrnf3rf34", "3049309rifeif3" ] });

 

Event: addToCart

Example code:  

window.liQ = window.liQ || [];
window.liQ.push({
"event": "addToCart", "items": [ {
"id": "3983rjk2jr432r", "price": 12.32 , "quantity": 1, "currency": "USD"
}, {
"id": "dkfhdskfhks", "price": 32.21 , "quantity": 2, "currency": "USD"
} ] });

 

Event: conversion (product purchase) 

Example code:  

window.liQ = window.liQ || [];
window.liQ.push({
"event": "conversion", "conversionId": "foduze9rew9r0we8r9evze", "name": "product_purchase", "email":"joe@example.com", "amount": 44.53, "currency": "USD", "items": [ {
"id": "3983rjk2jr432r", "price": 12.32, "quantity": 1, "currency": "USD"
}, {
"id": "dkfhdskfhks", "price": 32.21, "quantity": 2, "currency": "USD"} ] });


Technical spec for the standard events 

Event: viewContent 

Example code:

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewContent", "contentType": [String (optional, valid values: Product, Hotel, Flight, Destination, LandingPage, Article)], "name": [String (optional)] });

 

Event: viewSearchResult

Example code:

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewSearchResult" "currentPage": [Integer (optional)], "searchTerm": [String (optional)], "itemIds": [Array of Strings (optional)] });

 

Event: viewCategory

Example code:

window.liQ = window.liQ || [];
window.liQ.push({
"event": "viewCategory", "email": [String (optional)], OR "emailHash": [String, md5 or sha1 or sha256 (optional)], "currentPage": [Integer (optional)], "name": [String (optional)], "itemIds": [Array of Strings (optional)] });

Event: addToCart

Example code:

window.liQ = window.liQ || [];
window.liQ.push({
"event": "addToCart", "email": [String (optional)], OR "emailHash": [String, md5 or sha1 or sha256 (optional)], "name": [String(optional)], "items": [Array of objects (optional) where: {
"id": String (required), "price": Double (optional), "quantity": Integer (optional), "currency": String (optional) according to http://www.xe.com/iso4217.php
} ] });

Event: removeFromCart

Example code:

window.liQ = window.liQ || [];
window.liQ.push({
"event": "removeFromCart", "email": [String (optional)], OR "emailHash": [String, md5, sha1, sha256 (optional)], "name": [String(optional)], "items": [Array of objects (optional) where: {
"id": String (required), "price": Double (optional), "quantity": Integer (optional), "currency": String (optional) according to http://www.xe.com/iso4217.php
}
] });

Event: conversion

Example code:

window.liQ = window.liQ || [];
window.liQ.push({
"event": "conversion", "email": [String (required)], OR "emailHash": [String, md5 or sha1 or sha256 (required)], "name": [String(optional)], "conversionId": [String(optional, recommended)], "amount": [Double (optional, recommended)], "currency": String (optional) according to http://www.xe.com/iso4217.php, "items": [Array of objects (optional) where: {
"id": String (required), "price": Double (optional), "quantity": Integer (optional), "currency": String (optional) according to http://www.xe.com/iso4217.php
} ] });

Don't see the event you'd like to track?

Custom Events are available through the LiveIntent Platform, so if there is an event that you would like to track that is not in the above list, please reach out to your Customer Success representative.

Was this article helpful?
1 out of 1 found this helpful
Powered by Zendesk