Instructions
Place both the LiveConnect Tag and the Add Product to Cart script in the header section of your webpage for the specific section.
Use the LiveConnect Tag provided by your account team, as it will contain a unique App_ID variable (e.g. a-0045). The LiveConnect Tag below (above the Add Product to Cart script) is an example.
The below Add Product to Cart script includes placeholders (denoted in green) that represent where your specific website dynamic values should be placed. Please use the below Add Product to Cart script for implementation. In the case where a user has added multiple products to the cart, multiple item arrays can be captured.
<script type="text/javascript" src="//b-code.liadm.com/a-xxxx.min.js" async="true"></script> <script> window.liQ = window.liQ || []; window.liQ.push { event: "addToCart", email: "[USER_EMAIL]", items: [ {id: "[PRODUCT_ID]", price: [ITEM_PRICE], quantity: [QUANTITY], currency: "[CURRENCY_TYPE]"} ] }; </script> |
Parameter: Value |
Requested Value Output |
Value Format |
Status |
Notes |
event: "addToCart" |
"addToCart" |
"addToCart" |
Required |
Pre-hardcoded, please implement exactly as shown. |
email: "[USER_EMAIL]" |
Email address of logged in or known site visitor |
String |
Required (if not passing MD5 Hash) |
|
emailHash: "[USER_MD5HASH]" |
MD5 Hash |
String |
Required (if not passing email) |
Hashing Protocol: lower case email address Example email: nickfury@theavengers.com MD5: f5d74b7a968427433fc5957bf3d06486 |
id: "[PRODUCT_ID]" |
Product ID |
String |
Required |
Product ID should match Product IDs delivered in the product feed. Needs to have a consistent case (upper or lower case). |
price: [ITEM_PRICE] |
Product price |
Number with Decimals |
Optional |
|
quantity: [QUANTITY] |
Quantity of product |
Integer |
Optional |
|
currency: "[CURRENCY_TYPE]" |
Currency Type |
Transaction currency, 3 letter string |
Optional |
|
Example Output:
<script> window.liQ = window.liQ || []; window.liQ.push { event: "addToCart", email: "captainamerica@liveintent.com", items: [ {id: "3983rjk2jr432r", price: 12.99, quantity: 2, currency: "USD"} ] }; </script> |