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
- Sign in at tagmanager.google.com
- Pick the container you want (or create a new Web-type one)
- The container ID appears in the top-right corner as
GTM-XXXXXXX - Copy it
2. Connect the container to Putiikkipalvelu
- In the dashboard, go to Plugins → Google Tag Manager → Configure
- Paste the container ID into the Container ID field
- 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:
- Open the container
- Click Preview in the top right
- Enter your storefront URL and click Connect
- Browse the site — events such as
view_itemandadd_to_cartshould 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.
| Event | Fires when | Includes |
|---|---|---|
view_item | Customer opens a product page | item ID, name, price, category, variant |
add_to_cart | The Add to cart button is pressed | product, selected variation, price |
remove_from_cart | An item is removed from the cart | product, quantity, total value |
view_cart | The cart page is opened | all items, cart total |
begin_checkout | The checkout page is opened (Stripe or Paytrail) | all items, total, discount code |
purchase | An order has been paid | order 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_variantas "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.
Recommended use cases
Google Analytics 4
The most common use of GTM is wiring up GA4 measurement.
- In GTM: Tags → New → Google Analytics: GA4 Configuration
- Paste your GA4 measurement ID (
G-XXXXXXX) - Trigger: All Pages
- Add separate tags for Enhanced E-commerce events (
purchase,add_to_cart, etc.) — GA4 reads the events your store sends with no extra config - Publish the container (Submit)
In GA4's Conversions section, mark purchase as a conversion so it shows up separately in reports.
Google Ads conversion
If you run Google Ads:
- In GTM: Tags → New → Google Ads Conversion Tracking
- Paste the conversion ID and conversion label
- Trigger: Custom Event → event name
purchase - Use variables
{{ecommerce.value}},{{ecommerce.transaction_id}}and{{ecommerce.currency}}to pass the value and order ID
Meta Pixel (Facebook/Instagram ads)
- In GTM: Tags → New → Custom HTML
- Paste the Meta Pixel install code (you'll find it in Meta Events Manager)
- Trigger: All Pages
- Add separate tags for
Purchase,AddToCart, andViewContentpixel events — use the events your store sends as triggers (purchase,add_to_cart,view_item) - Set the tag's Consent Settings → require ad_storage
Cookie banner and consent
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:
- Analytics →
analytics_storage: granted→ GA4 starts collecting stats - Marketing →
ad_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
- Go to Plugins → Google Tag Manager
- Click Remove
- 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
| Problem | Likely cause |
|---|---|
| No events show up in GTM Preview | Analytics consent hasn't been accepted in the cookie banner |
| Events appear in GTM but not in GA4 | The GA4 configuration tag hasn't been published (Submit) in GTM |
purchase event fires twice | The customer opened the order confirmation in two tabs — both fire once |
| Container ID won't save | The ID doesn't start with GTM- — make sure you copied the right value |
| Ad tracking doesn't work in incognito | The banner asks for consent in every new session — this is expected |