Use Code Injection to add Google Tag Manager, TikTok, Pinterest, heatmap or other tracking code to every page of your Sociavore website.


Code Injection lets you add a tracking code or other script to the <head> of every page of your Sociavore website. Use it for tools that don't have a built-in Sociavore integration — for example your own Google Tag Manager container, a TikTok or Pinterest tag, or a heatmap tool such as Microsoft Clarity or Hotjar.

Use Integrations for Google Analytics and Facebook Pixel

Google Analytics 4 and the Facebook (Meta) Pixel have built-in integrations under Store → Ecommerce Settings → Integrations. They only need your ID and also send your online ordering events (add to cart, checkout, purchase). Don't paste their code here as well, or every visit and order will be counted twice.

Please check Google Analytics to understand how to connect GA4 with your Measurement ID, and Facebook Pixel to understand how to connect your Pixel ID.

How to add code to your website

  1. Copy the code snippet from the tool you want to add. Most tools call it the "install code", "tracking code" or "header code".
  2. In your Sociavore dashboard, click Website in the left menu, then open the Advanced tab.
  3. In the Code Injection box, paste the code. If there is already code in the box, add yours on a new line below it — don't delete the existing code.
  4. Click Save. The code goes live on your website straight away — you don't need to publish.
Website → Advanced → Code Injection: paste the code and click Save

Example: Google Tag Manager

If you manage your own tags in Google Tag Manager, paste the head part of your container code. It looks like this — your container ID replaces GTM-XXXXXXX:

Code block, click to copy
<!-- 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-XXXXXXX');</script>
<!-- End Google Tag Manager -->

If you use your own Google Tag Manager, don't add a GA4 tag inside it for the same Measurement ID that you connected in Sociavore Integrations, or GA4 will count visits twice.

Tips

  • Only paste code from tools you trust. Code in this box runs on every page of your website.
  • Paste the code exactly as the tool gives it to you. A missing bracket or quote can stop the code from working.
  • To check it works, open your website and use the tool's own test (for example Google Tag Manager Preview mode or the tool's "verify installation" button).
  • To remove a tool, delete its code from the Code Injection box and click Save.