User journey event tracking - Google Tag Manager
Google Tag Manager (GTM) is a powerful tool that allows you to manage and deploy marketing tags (snippets of code or tracking pixels) on your website without having to modify the code. Here's a simple guide to help you set up GTM on your site.
Step 1: Create a GTM Account and Container
- Go to the Google Tag Manager website.
- Click on Create Account if you don’t already have one.
- Enter your account name (usually your company name).
- Under the same account, you can create a container for your website. Enter your website name and select the target platform as Web.
- Click Create.
Step 2: Add GTM Code to Your Website
After creating your container, you will be provided with a GTM code snippet.
This code needs to be added to your website’s pages
- Go to Sharefox Admin
- Go to Admin > Settings > Integrations > Marketing tab
- In the Google Tag manager panel add the GTM code id.
- Example below
- Click the Publish button on the top right corner to save the changes.
Events
With Google Tag Manager integration, you can track several types of events on the user journey while users are browsing and purchasing on your Sharefox site:
- Purchase event
- Login
- Register
- Contact Us form submission
See below for a detailed description of the data structure provided for each event type.
1. Purchase event
event name: 'purchase'
- user_id
- phone
- user_type ('private', 'company')
- currency (ex: 'NOK')
- original_location (site URL)
- event ('purchase')
- ecommerce
- transaction_id (order id)
- value (total price of order)
- tax (value of tax of the order)
- coupon (coupon code)
- payment_type ('Card', 'Faktura', etc.)
- discount_value (coupon value)
- deposit_value
- items
- item_name (Product name)
- item_category (Product type: 'main product', 'accessory', 'consumable')
- price
- quantity
- rental_length (Rental length in days)
- item_tax (Item VAT value)
- affiliation (Delivery pickup location)
2. Login event
event name: 'login'
- user_id
- user_type ('private', 'company')
- currency (ex: 'NOK')
- original_location (site URL)
- event ('login')
- method ('Password', 'Google', 'BankID')
3. Sign up event
event name: 'sign_up'
- user_id
- user_ type ('private', 'company')
- currency (ex: 'NOK')
- original_location (site URL)
- event ('sign_up ')
- method ('Password', 'Google', 'BankID')
4. Contact form
event name: 'contact_form'
- user_id
- user_type ('private', 'company')
- currency (ex: 'NOK')
- original_location (site URL)
- event ('contact_form')
- topic (Topic selected on contact form)
Related link: https://tagmanager.google.com
Norwegian version: https://help.sharefox.no/article/506-oppsett-av-google-tag-manager