Sending carts and displaying the game

Steps and examples to send shopping carts and display the game.

TagCommander / CommandersAct integration

Warning : TagCommander / CommandersAct integration requires some knowledge of such tag management system.

Datalayer and tag configuration issues within tag management system must be adressed to Tag Commander support team in the first place.

Files location and description

javascript/tagcommander.js : the JS template code to be used in the tag.

Integration steps

1. Create tags on pre-production and production

Create two tags - one for pre-production (e.g. "Lucky Cart - test") and the other for production (e.g. "Lucky Cart - prod") and paste the code template provided above in each one.

2. Adapt and configure tags

Modify each tag code to suit your needs, paying a special care to the followings :

  • API key, API secret and the URL to the luckyclient.min.js library are provided by Lucky Cart and must correspond to the targeted environment (production or pre-production/staging/test/dev)
  • datalayer variable names and values (tc_vars["..."]) cand differ from one customer to another

3. Insert game locator

Put the following container on the order confirmation page in the chosen position to display the game:

<div id="luckygame">
  <!-- Luckycart plugin will be displayed here -->
</div> 

4. Trigger and publish tags

Trigger and publish each tag on the order confirmation page for every order, respecting the proper environnement.

Also make sure it is executed as soon as possible but after datalayer is populated and game locator is available in the dOM document.