Documentation
  • The Fundamental
  • ACTIVE SYNC
    • Data Ingestion
      • Data Tracking
        • API Key Management
        • Generate Tracking ID
        • Install tracking with Tag Manager
        • Install Tracking from the Console
        • Tracking Method on Website
      • Datasource
        • MySQL
        • PostgreSQL
        • MongoDB
        • Microsoft SQL Server
        • Shopify
        • CSV
        • Google Sheets
    • Data Ingestion API
      • Data Lake
        • File upload
        • Tracking API
      • Data Warehouse
        • Batch upload
        • CSV upload
        • Tracking API
      • Data Schema Warehouse API
    • Data Integrations
      • Manage your API Key
      • Get Data using API
  • ROCKET.BI
    • Introduction
    • Data Warehouse
      • Data Management
      • Ad-hoc Query
        • Measure Schema
        • Calculated Field
      • Query Analysis
      • Relationship
    • Row-level Security
    • Dashboard
      • Dashboard Filter
      • Chart Control
        • Tab Control
        • Single Choice
        • Multiple Choice
        • Dropdown Control
        • Slicer Control
        • Date Control
        • Input Control
      • Manage Dashboard
        • Relationship
        • View and Share
        • Select Main Date Filter
        • Boost
        • Settings
        • Add Chart
        • Add Tab
        • Add Text
    • Chart Builder
      • Chart Types
        • Pie Chart
        • Column Chart
        • Bar Chart
        • Line Chart
        • Line Stock Chart
        • Pareto Chart
        • Bubble Chart
        • Scatter Chart
        • Map Chart
        • Area Chart
        • KPI Chart
        • Lollipop Chart
        • Parliament Chart
        • Funnel Chart
        • Pyramid Chart
        • Gauge Chart
        • Bullet Graph Chart
        • Heat Map Chart
        • Word Cloud Chart
        • Tree Map Chart
        • Stacked Column Chart
        • Stacked Bar Chart
        • Sankey Chart
        • Spider Web Chart
        • Wind Rose Chart
        • Histogram Chart
        • Bell Curve Chart
        • Table Chart
        • Pivot Table Chart
      • Chart Settings
        • Zoom
        • Inner chart filter
      • Chart Filters
        • Tab Filter
        • Single Choice
        • Multiple Choice
        • Dropdown Filter
        • Slicer Filter
        • Date Filter
        • Input Filter
      • Right-click Settings
        • Change date function
        • Drill down
        • Drill through
        • Use as a filter
    • SQL Query
      • Syntax
      • Functions
      • Aggregate Functions
      • Data Types
  • UNLOCK.CI
    • Unlock.CI
Powered by GitBook
On this page
  1. ACTIVE SYNC
  2. Data Ingestion
  3. Data Tracking

Install tracking with Tag Manager

PreviousGenerate Tracking IDNextInstall Tracking from the Console

Last updated 2 years ago

  1. Create Tag Manager account correspond with your data platform.

    Just fill out the form and click Create. If you have an account, you can skip this step and move to step 2.

  2. Install Google Tag Manager script to your platform.

    After your account created, you will see Google Tag Manager’s (GTM) installation instruction. Just follow the guide.

    If you miss the the instruction, just click the key to reopen it

  3. Config GTM Tag to use DiAnalytics ********Web SDK

    Assuming is installed and DiAnalytics.init(<UNLOCK_CI_DOMAIN>, <API_KEY>) is called in your platform.

    1. Assuming your website had the script below:

      <button onclick="dataLayer.push({event: 'click_save_button', data: ''})">This is a button</button>

    2. Config Custom Trigger

      1. Go to Triggers tab → Select New button → Click on Trigger Configuration

      2. Select Custom

      3. Click on Save with name “Click Save Data”

    3. Config Variables

      Built-in variables are default variables, which are provided by GTM. In this case, we show you how to config custom variable

      1. In User-Defined Variables frame, Click on New → Click on Variable Configuration → Select Data Layer Variable

      2. We use ‘data’ to set for Data Layer Variable Name for this example

      3. Click on Save with name ‘Data’

    4. Config GMT Tag with Custom Trigger

      1. Select Add a new tab

      2. Select Tag Configuration

      3. Select Custom HTML

      4. Insert the javascript code into GTM Custom HTML Tag

        <script>

        window.DiAnalytics.track("click_save_data", { data: {{ Data }} })

        </script>

        Data: configured variable at Step 3.2

        We use window.DiAnalytics.track function so that we could track general event info. In addition to, we have already defined details tracking functions. You can use more , depending on which functions are needed in your application.

      5. Scroll down and Click on Triggering

      6. Select ‘Click Save Data’ Trigger saved at Step 2.3

      7. Click on Save and Publish

      8. Your setup GTM is successful

DiAnalytics
DiAnalytics’s functions