Plugins

Google Tag Manager

Connect Google Tag Manager to your store and track visitors, purchases, and conversions from a single place

Google Tag Manager (GTM) is Google's free tag container — a single integration that lets you add tracking scripts like Google Analytics 4, Google Ads conversion tracking, or the Meta Pixel without touching your store's code. In Putiikkipalvelu you connect GTM with one container ID and your store immediately starts sending pre-built e-commerce events.

Before you start

  • A Google Tag Manager account at tagmanager.google.com
  • A container created in that account — its ID looks like GTM-XXXXXXX
  • Access to Plugins in the Putiikkipalvelu dashboard

Container vs. account

A single Account can hold multiple Containers. Each container represents one website — so create a separate container for each Putiikkipalvelu store you run.

1. Get the container ID from Google Tag Manager

  1. Sign in at tagmanager.google.com
  2. Pick the container you want (or create a new Web-type one)
  3. The container ID appears in the top-right corner as GTM-XXXXXXX
  4. Copy it

2. Connect the container to Putiikkipalvelu

  1. In the dashboard, go to Plugins → Google Tag Manager → Configure
  2. Paste the container ID into the Container ID field
  3. Click Save

A green confirmation appears, and back in the Plugins view the Google Tag Manager card now shows Configured.

Container ID format

The ID always starts with GTM-. If you accidentally paste a Google Analytics measurement ID (G-XXXXXXX), tracking won't work — GA4 IDs are added inside GTM, not directly to the store.

3. Verify GTM is firing

In the GTM dashboard:

  1. Open the container
  2. Click Preview in the top right
  3. Enter your storefront URL and click Connect
  4. Browse the site — events such as view_item and add_to_cart should appear in the GTM debug panel

If no events appear, check that:

  • You have accepted analytics in the cookie banner on the storefront (consent is denied by default)
  • The container ID was saved correctly in the dashboard
  • Your browser's ad blocker isn't blocking the GTM script

What events your store sends

Your store pushes pre-built Google GA4 Enhanced E-commerce events to GTM's dataLayer. You can use these directly in Google Analytics, Google Ads, or any GTM-compatible tool.

EventFires whenIncludes
view_itemCustomer opens a product pageitem ID, name, price, category, variant
add_to_cartThe Add to cart button is pressedproduct, selected variation, price
remove_from_cartAn item is removed from the cartproduct, quantity, total value
view_cartThe cart page is openedall items, cart total
begin_checkoutThe checkout page is opened (Stripe or Paytrail)all items, total, discount code
purchaseAn order has been paidorder number, total, shipping, discount code, items

Event structure

All events follow the same shape:

{
  event: "purchase",
  ecommerce: {
    transaction_id: "1042",
    currency: "EUR",
    value: 49.90,
    shipping: 5.90,
    coupon: "SUMMER20",
    items: [
      {
        item_id: "abc123",
        item_name: "Blueberry Jam 250g",
        price: 6.50,
        currency: "EUR",
        quantity: 2,
        item_category: "Jams",
        item_variant: "250g / Glass jar"
      }
    ]
  }
}
  • Prices are in euros with decimals (not cents) — they match the totals shown on the order
  • Variations appear in item_variant as "Size / Color"
  • Category is taken from the product's first category

Tip — purchase event

The purchase event on the order confirmation page fires only once per order, even if the customer refreshes. This prevents Google Analytics from counting the same order twice.

Google Analytics 4

The most common use of GTM is wiring up GA4 measurement.

  1. In GTM: Tags → New → Google Analytics: GA4 Configuration
  2. Paste your GA4 measurement ID (G-XXXXXXX)
  3. Trigger: All Pages
  4. Add separate tags for Enhanced E-commerce events (purchase, add_to_cart, etc.) — GA4 reads the events your store sends with no extra config
  5. Publish the container (Submit)

In GA4's Conversions section, mark purchase as a conversion so it shows up separately in reports.

If you run Google Ads:

  1. In GTM: Tags → New → Google Ads Conversion Tracking
  2. Paste the conversion ID and conversion label
  3. Trigger: Custom Event → event name purchase
  4. Use variables {{ecommerce.value}}, {{ecommerce.transaction_id}} and {{ecommerce.currency}} to pass the value and order ID

Meta Pixel (Facebook/Instagram ads)

  1. In GTM: Tags → New → Custom HTML
  2. Paste the Meta Pixel install code (you'll find it in Meta Events Manager)
  3. Trigger: All Pages
  4. Add separate tags for Purchase, AddToCart, and ViewContent pixel events — use the events your store sends as triggers (purchase, add_to_cart, view_item)
  5. Set the tag's Consent Settings → require ad_storage

Once GTM is enabled, a cookie banner appears automatically on your storefront with three categories:

  • Necessary — always on, can't be toggled off
  • Analytics — e.g. Google Analytics
  • Marketing — e.g. Google Ads, Meta Pixel

GTM uses Google's Consent Mode v2: before consent is given, scripts load without cookies, so your store is GDPR-compliant by default. As soon as a customer accepts:

  • Analyticsanalytics_storage: granted → GA4 starts collecting stats
  • Marketingad_storage: granted → Google Ads and Meta Pixel get full tracking

Don't install your own cookie banner

The cookie banner shipped with your store is already integrated with GTM's Consent Mode. Installing your own banner (e.g. Cookiebot or OneTrust) through GTM will result in double consent and can break tracking. Use the built-in banner only.

Removing the plugin

  1. Go to Plugins → Google Tag Manager
  2. Click Remove
  3. Confirm

After removal:

  • The container ID is dropped from your store on the next page load
  • E-commerce events stop being sent
  • The cookie banner disappears automatically if GTM was the only consent-requiring plugin

Troubleshooting

ProblemLikely cause
No events show up in GTM PreviewAnalytics consent hasn't been accepted in the cookie banner
Events appear in GTM but not in GA4The GA4 configuration tag hasn't been published (Submit) in GTM
purchase event fires twiceThe customer opened the order confirmation in two tabs — both fire once
Container ID won't saveThe ID doesn't start with GTM- — make sure you copied the right value
Ad tracking doesn't work in incognitoThe banner asks for consent in every new session — this is expected