Sending carts and displaying the game

Steps and examples of how to use the chosen integration technology or language to send shopping carts and display the game.

Integration with Google Tag Manager

The use of Google Tag Manager technology to integrate Lucky Cart (the detailed steps are shown below) presupposes expert knowledge of the tag management system.

In the event of a problem relating to its use or the implementation of specific data into the e-commerce site, it is recommended to contact the Google Tag Manager support team in the first instance.

Files location and description

javascript/gtm.html: the tag HTML code

Integration steps

1. Identification and creation of macros

Verify that the macros/variables corresponding to the mandatory data are available in GTM and create them if required.

2. Implementing pre-production and production codes

Create two codes/tags, one for pre-production (e.g. "Lucky Cart - test") and the other for production (e.g. "Lucky Cart - prod") with the following properties:

- Type: HTML personalised/custom
- Code HTML: based on this file javascript/gtm.html javascript/gtm.html
- Trigger rules: exclusively on the order confirmation page of each environment

 

3. Tag configuration

Configure all the following elements:

- API key and API secret for the library luckyclient.min.js (given by Lucky Cart) related to the corresponding environment (pre-production/production).
- Field values by using the macros/variables ({{...}}) available on the order confirmation page
- Make sure the trigger happens exclusively on the order confirmation page of the corresponding environment.

4. Inserting a game display tag

Position 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> 

5. Publish tags

Publish tags previously created in GTM in all environments.