ConvertedIn | DOCS
  • Overview
  • Before you start
    • Integrating Firebase Cloud Messaging for Push Notifications
  • Android
    • Getting started with Android SDK
  • IOS
    • Getting started with the iOS SDK
  • WooCommerce
    • Getting Started
    • Plugin installation steps
  • Shopify
    • Getting Started
  • API
    • Connect your store using API, Getting started
    • Categories
    • Products
    • Customers
    • Orders
    • Webhooks
  • magento | webhooks
    • Getting started
  • Salla
    • Getting started
  • Pixel
    • Getting Started
    • Client SDK
    • Integrate ConvertedIn Pixel using GTM
    • Shopify Integration for Initiate checkout Event
  • DSP
    • Getting Started
Powered by GitBook
On this page
  • Installation
  • Send tracking events
  • Already Got GTM installed
  • Identify Customer

Was this helpful?

  1. Pixel

Integrate ConvertedIn Pixel using GTM

if you don't have a GTM already setup you can use

Installation

First include the sdk in your website in the last record of the <head> tag

```js
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-P5BMX39V');</script>
    <!-- End Google Tag Manager -->
```

Then before the close tag of <body>

```js
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P5BMX39V"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->
```

Send tracking events

All events will be sent through GTM data layer object as shown in the below table.

Event Name
Event Description

PageView

ViewContent

AddToCart

InitiateCheckout

Purchase

Already Got GTM installed

Ask the team for the latest export GTM json including ( Folders, Tags, Varibles, Triggers).

Then continue with your datalayer firing.

Identify Customer

After login, you can assign your customer id in the local storage with a key called ci_cid to ensure the data integrity with the customer journey in your website.

PreviousClient SDKNextShopify Integration for Initiate checkout Event

Last updated 3 months ago

Was this helpful?

dataLayer.push({
                'event': 'ConvertedInPageView',
                'PageView': true,
            });
dataLayer.push({
                'event': 'ConvertedInViewContent',
                'ViewContent': true,
                'ViewContentData': {
                    content: [
                        {
                            id: 1234, // required
                            quantity: 3, // required
                            name: "Product name", // optional
                            category: "Product Category", // optional
                        }
                    ],
                    currency: "USD", // required
                    value: 150.50 // required, sum of products price
                }
            });
dataLayer.push({
                'event': 'ConvertedInAddToCart',
                'AddToCart': true,
                'AddToCartData': {
                    content: [
                        {
                            id: 1234, // required
                            quantity: 3, // required
                            name: "Product name", // optional
                            category: "Product Category", // optional
                        }
                    ],
                    currency: "USD", // required
                    value: 150.50 // required, sum of products price
                }
                
            });
dataLayer.push({
                'event': 'ConvertedInInitiateCheckout',
                'InitiateCheckout': true,
                'InitiateCheckoutData': {
                    content: [
                        {
                            id: 1234, // required
                            quantity: 3, // required
                            name: "Product name", // optional
                            category: "Product Category", // optional
                        }
                    ],
                    currency: "USD", // required
                    value: 150.50 // required, sum of products price
                }
                
            });
dataLayer.push({
                'event': 'ConvertedInPurchase',
                'Purchase': true,
                'PurchaseData': {
                    content: [
                        {
                            id: 1234, // required
                            quantity: 3, // required
                            name: "Product name", // optional
                            category: "Product Category", // optional
                        }
                    ],
                    currency: "USD", // required
                    order_id: 123,
                    value: 150.50 // required, sum of products price
                }
                
            });