Spindl
  • 👋Overview
    • Introduction
    • Attribution
    • Privacy
  • Your Spindl app setup
    • Managing team members
  • 🪄Features
    • 📈Onchain Attribution
      • 📉Plotting attribution
    • 📊Web3-native Analytics
      • Chart Builder
      • Event Selection and Filtering
      • Line Chart
      • Funnel
      • Cohort Retention
      • Sankey Diagram
      • Big Numbers
      • Pies and Donuts
    • 🧍‍♂️Audiences
      • Creating an audience
    • 🔗Short Links
      • 🖇️Custom Domains
    • 🤝Referrals
      • Management and reporting
      • ⏩Quick Start
      • ⛓️Technical Details
  • ⚙️Techncial
    • ⏩Start Here
    • Google GTM Guide
    • Javascript SDK / HTML Script Guide
      • ➡️Install
      • ➡️Wallet Connects
      • ➡️Page Views
      • ➡️Custom Events
      • ✅Verify That Events Are Sent Correctly
      • React, Next.js & Html Examples
      • Setup a Reverse Proxy
        • Using Next.js
        • Using Cloudflare Workers
        • Netlify
      • ➡️Referrals
      • Default vs Lite SDK Versions
      • Security
    • API
      • ➡️Short Links
      • ➡️Custom Events API
      • Data Exports
    • Android SDK
    • iOS (Swift) SDK
    • On-Chain
      • ➡️Rewards
  • Contact Spindl
  • Ads
    • ⏩Start Here
    • 📢Creative Specifications
      • Web Banner Ads
      • Discord Embeds
Powered by GitBook
On this page
  • I. Add Spindl SDK as a Tag
  • II. Track Custom Events
  1. Techncial

Google GTM Guide

PreviousStart HereNextJavascript SDK / HTML Script Guide

Last updated 4 months ago

To implement , you need to do 2 main steps:

I. Add Spindl SDK as a Tag

  1. In Your Tags Section, click New

  2. In Tag Configuration, select Custom Html

  1. Paste in Spindl Script below with the unique SDK Key that we provide to you. This code does 3 things:

  • Installs spindl script

  • Enables auto Page View events

  • Enables auto Wallet Connect events

    • (we can only collect Wallet Connect events automatically for Metamask chrome extension. If you want to also capture Coinbase, OKX and other types wallets, then contact us & we will help set you up)

<script src="https://cdn.spindl.xyz/attribution-1-8-1.js"></script>

<script>
 window.spindl.configure({
   sdkKey: "<Your SDK Key Here>" // use your personal SDK key here
  });
  
  window.spindl.enableAutoPageViews();
  window.spindl.enableAutoWalletConnects();
  
</script>
  1. For Triggering, choose Initialization - All Pages

  1. Click Save and don't forget to Submit the changes at the top right once you're ready.

Once submitted, you should shortly see Page View and Wallet Connect events in your Spindl Dashboard under the Data tab

II. Track Custom Events

Now that the Spindl SDK has been instantiated and some events are flowing, you may want to track important custom events. These could be anything from button clicks to form submissions, navigation to specific areas, purchases, etc. To set this up, we need to follow 3 steps:

  1. Configure your Triggers:

  • There are many ways to configure these that are outside the scope of Spindl. Feel free to watch some tutorials on YouTube to familiarize yourself with options if you're new to this

  1. Add Spindl Tag Template:

  • Go to Templates section and in Tag Templates section click on Search Gallery

    • Find & Select Spindl Tag Template

  1. Configure Your Triggers & Tags:

  • Go to the Tags Section and click on New to create a new Tag

  • In Tag Configuration select Spindl Tag Template that you added in step 2.

  • Add the Event Name that you want to show up in the attribution

    • Event Type is by default Custom. We may add more options here in the future

  • In Triggering, pick the triggers that you configured in Step 1 and click Save. You can Preview the changes (button in top right) before you submit the Workspace Changes.

    • After 10-20 seconds you should start seeing Custom events in the Spindl Data tab

⚙️
GTM