General setup guideFollow

If you are implementing the tags via a Tag Management Solution such as TagMan, Opentag or similar then please refer to the relevant guide here:

Implementing via a TMS

------------------------------------------------------------------------------------------------------------

 

1. Necessary details before commencing integration

  • Contact your account manager at VisualDNA to get hold of your unique API Key
  • Please note the tag management solution you are using and see the relevant section of our documentation
  • Determine how you may dynamically inject values for the *Dynamic Parameters below into VisualDNA pixels. The more parameters you populate the greater the insight you will get. 
Static Parameters The Information Captured Required Format
api_key Unique API Key to identify account. Specified and supplied by your account manager text:numbers
id Tag ID Specified by VDNA per tag type and  supplied within code text 
*Dynamic Parameters The Information Captured Required Format
product_id The unique id of a product URL escaped alphanumeric identifier including dashes and underscores
product_name The unique name of a product URL escaped text 
product_category_id The unique id of a product category URL escaped alphanumeric identifier including dashes and underscores 
product_category The unique name of a product category URL escaped text 
product_price The price of a product float with 2 d.p. 
product_quantity The number of a given product purchased integer
currency

The 3 letter code for local currency. Please see this: http://www.xe.com/iso4217.php

3 letter code, for example: RUB, GBP, USD, EUR 
transaction_id the unique id of a transaction  URL escaped alphanumeric identifier including dashes and underscores
 value the total transaction amount. One transaction may include multiple products   float with 2 d.p.
payment_type the method used to pay for the transaction format is set on a per client basis by VisualDNA

 

2. Deploy VisualDNA Audience Analytics Tag (AAT) across your site

 

Please see this article on how to complete this first step: 

https://whysupport.visualdna.com/hc/en-us/articles/201217013

 

 

3. Product - 'Add to Shopping Basket' pixels

 

Whenever a user inserts a product into his basket, the following pixel should be injected into the page: 

<img src="//e.visualdna.com/conversion?api_key={VISUALDNA_API_KEY}&id=added_to_basket&product_id={PRODUCT_ID}&product_name={PRODUCT_NAME}&product_category_id={PRODUCT_CATEGORY_ID}&product_category={PRODUCT_CATEGORY}&product_price={PRODUCT_PRICE}&currency={CURRENCY}" width="1" height="1" alt="" />

Please replace the placeholder parameter values with relevant data as per the required format listed above.

For example, product_id={PRODUCT_ID} would become product_id=PROD_01

 

4. Product - 'Remove from Shopping Basket' pixels

Whenever a user removes a product from his basket, the following pixel should be injected into the page: 

<img src="//e.visualdna.com/conversion?api_key={VISUALDNA_API_KEY}&id=removed_from_basket&product_id={PRODUCT_ID}&product_name={PRODUCT_NAME}&product_category_id={PRODUCT_CATEGORY_ID}&product_category={PRODUCT_CATEGORY}&product_price={PRODUCT_PRICE}&currency={CURRENCY}" width="1" height="1" alt="" />

Please replace the placeholder parameter values with relevant data as per the required format listed above. 

For example, product_id={PRODUCT_ID} would become product_id=PROD_01

 

5. Product 'Purchased' pixels

Whenever a user confirms the purchase of a product, fire the following pixel.

<img src="//e.visualdna.com/conversion?api_key={VISUALDNA_API_KEY}&id=purchased&product_id={PRODUCT_ID}&product_name={PRODUCT_NAME}&product_category_id={PRODUCT_CATEGORY_ID}&product_category={PRODUCT_CATEGORY}&product_price={PRODUCT_PRICE}&product_quantity={PRODUCT_QUANTITY}&currency={CURRENCY}&transaction_id={TRANSACTION_ID}" width="1" height="1" alt="" />

If the user has purchased multiple products,  fire an individual pixel for each separate product purchased with the same value for the transaction_id parameter.

Please replace the placeholder parameter values with relevant data as per the required format listed above.  

For example, product_quantity={PRODUCT_QUANTITY} would become product_quantity=1

 

6. Total Transaction Summary Pixel

Whenever a user confirms a purchase, fire the following pixel which summarises the whole transaction.

<img src="//e.visualdna.com/conversion?api_key={VISUALDNA_API_KEY}&id=transaction&transaction_id={TRANSACTION_ID}&value={TOTAL_TRANSACTION_VALUE}&currency={CURRENCY}&payment_type={PAYMENT_TYPE}" width="1" height="1" alt="" />

Please replace the placeholder parameter values with relevant data as per the required format listed above.  

For example, value={TOTAL_TRANSACTION_VALUE} would become value=170.00

 

7. Custom Event Pixel

Please refer to the following article if you wish to track any custom interaction/click based events that are not featured above.

https://whysupport.visualdna.com/hc/en-us/articles/202176118-How-to-track-custom-interaction-events

 

8. Worked Example

 

Let's say we have a site selling mens clothing with VisualDNA API key of "mensclothes1234".

A customer called John browses 10 products, adds 3 products to his basket, remove 1 from his basket and purchases 2 of the products with a debit card.

The 3 products added to John's basket are (with associated meta data):

  • Clavin Klein T-shirt, £36
    • [product_id = 12345, product_name=Clavin%20Klein%20T-shirt, product_category_id=5678, product_category = t-shirts, product_price = 36.00, currency = GBP]
  • Armani Jeans, £70
    • [product_id = 456, product_name=Armani%20Jeans, product_category_id=9191, product_category = "jeans", product_price = 70.00, currency = GBP]
  • Ralph Lauren Belt, £100
    • [product_id = 987, product_name=Ralph%20Lauren%20Belt, product_category_id=5664, product_category = "belts", product_price = 100.00, currency = GBP]

The single product removed from John's basket:

  • Clavin Klein T-shirt, £36 

The 2 products purchased are:

  • Armani Jeans, £70 
  • Ralph Lauren Belt, £100 

 

Pixels VisualDNA expects to be fired:

 

1/ The AAT should fire on every page John visits

 

2/ The add_to_basket pixel should fire 3 times:  

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=added_to_basket&product_id=12345&product_name=Clavin%20Klein%20T-shirt&product_category_id=5678&product_category=t-shirts&product_price=36.00&currency=GBP" width="1" height="1" alt="" />

 

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=added_to_basket&product_id=456&product_name=Armani%20Jeans&product_category_id=9191&product_category=jeans&product_price=70.00&currency=GBP" width="1" height="1" alt="" />

 

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=added_to_basket&product_id=987&product_name=Ralph%20Lauren%20Belt&product_category_id=5664&product_category=belts&product_price=100.00&currency=GBP" width="1" height="1" alt="" />

 

3/ The removed_from_basket pixel should fire once:

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=removed_from_basket&product_id=12345&product_name=Clavin%20Klein%20T-shirt&product_category_id=5678&product_category=t-shirts&product_price=36.00&currency=GBP" width="1" height="1" alt="" />

 

4/ The purchase pixel should fire 2 times:

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=purchased&product_id=456&product_name=Armani%20Jeans&product_category_id=9191&product_category=jeans&product_price=70.00&product_quantity=1&currency=GBP&transaction_id=123" width="1" height="1" alt="" />

 

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=purchased&product_id=987&product_name=Ralph%20Lauren%20Belt&product_category_id=5664&product_category=belts&product_price=100.00&product_quantity=1&currency=GBP&transaction_id=123" width="1" height="1" alt="" />

 

5/ The transaction pixel should fire only 1 time:

 

<img src="//e.visualdna.com/conversion?api_key=mensclothes1234&id=transaction&transaction_id=123&value=170&currency=GBP&payment_type=debit_card" width="1" height="1" alt="" />

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk