How to add Gamitee to your Shopify store - with transaction tracking

How to add Gamitee to your Shopify store - with transaction tracking

How to add Gamitee to your Shopify store

Step 1: Go to your Shopify admin site

image

Here click on “Customize theme”

Step 2: Click on “Customize”

image

Once you’ve open the “Themes” section, you will be able to see the “Customize” button in the right side of the screen, just click on it.

Step 3: Click on “Edit code”

image

Here you have to go to the lower left side corner, there you will see an option that is named “Theme actions” you have to click on it, this will display a list of options where you’ll find “Edit code” option.

Step 4: Click on “{/} theme.liquid”

image

Here you have to go to the “Layout” folder and click on it to display a .liquid files list, now click on “{/} theme.liquid”, this will automatically generate a code file in the right side of the screen.

Step 5: Find </body> section

image

Here you can add your Javascript code, just above “</body>” section.

  • If your website supports different languages, and you want the Gamitee tool to be available in those languages, Gamitee needs to be embedded with a separate script for each language. Click below for the appropriate language script.
⚠️

We advise that you don’t add the code to pages where users might write PIIs, like check-out pages, forms etc.

The end result should look like this:

image

Step 6: Save and refresh your site to see the results

Select which language to deploy

Gamitee deployment scripts

🌐
Arabic
Catalan
🇨🇳
Chinese Simplified
🇨🇿
Czech (Czech Republic)
🇩🇰
Danish (Denmark)
🇳🇱
Dutch
🇬🇧
English
🇫🇮
Finnish (Finland)
🇫🇷
French
🇩🇪
German
🇨🇭
German (Switzerland)
🇮🇱
Hebrew
🇮🇱
Hebrew - Fashion
🇮🇹
Italian (Italy)
🇯🇵
Japanese (Japan)
🇰🇷
Korean (Korea)
🇳🇴
Norwegian
🇵🇱
Polish (Poland)
🇵🇹
Portuguese (Portugal)
🇷🇴
Romanian
🇷🇺
Russian (Russia)
🇪🇸
Spanish (Spain)
🇸🇪
Swedish (Sweden)
🇺🇦
Ukrainian (Ukraine)

Adding our tracking code

If you have opted for enabling transaction tracking, you will also have to add our tracking code, so we can track and report to you which session ended with a purchase.

Steps:

  1. Copy our tracking code to your clipboard with cmd + c on a Mac or ctrl + c on a PC.
  2. {% if first_time_accessed %}
    <script>
    var transactionId = '{{ order_number }}';
    var value = '{{ total_price | money_without_currency }}';
    var productId = '{{ product.id }}';
    
    const analyticsData = JSON.parse(localStorage.getItem('gamitee-analytics-data'));
    if (analyticsData) {
        const req = new XMLHttpRequest();
        req.open('POST', 'https://analytics.gamitee.io/report-transaction');
        req.setRequestHeader('Content-Type', 'application/json');
        req.send(JSON.stringify({
            analyticsData: analyticsData,
            transactionId: transactionId,
            value: value,
    	productId: productId
        }));
    }
    </script>
    {% endif %}

  3. From your Shopify admin, go to Settings > Checkout.
  4. Under Order processing, go to the Additional scripts text box.
  5. Paste your tracking code from your clipboard with cmd + v on a Mac or ctrl + v on a PC.
  6. Final results should look like this:
  7. image

Enabling our service

After the deployment of the code, contact your CSM to enable the service.

⚠️

After adding the code users still won’t be able to see our service, as it is disabled by default by us.

While the service is live but disabled we will run a few last tests to make sure that everything works perfectly and we will notify you before enabling the service on our end.

Questions?

Want to contact our customer success team?

We get it, people need people

Feel free to contact your CSM, or email us and we’ll get back to you ASAP: team@gamitee.com

References: