Tracking tag
The tracking tag tells FitMyType which shop and country a visit belongs to, so your dashboards can count
visits, add to cart and orders. Paste it once, in the <head> of every page.
<script>
window.fmtdataLayer = window.fmtdataLayer || [];
window.fmttag = window.fmttag || function () { window.fmtdataLayer.push(arguments); };
fmttag('config', { clientId: 625, shopCountry: 'NO', channel: 'web' });
</script>
<script async type="module" src="https://recommender.fitmytype.com/fmttag.js"></script>
Replace clientId with the id from your back-office: Settings › Account shows this snippet with
your id and default shop country filled in. Use WW as the shop country for a worldwide shop.
The first lines set up window.fmttag before the tag loads. Calls you make before it loads wait
in window.fmtdataLayer and are sent once it is ready, so the tag never blocks your page.
The config line
The tag takes fmttag('config', { clientId, shopCountry, channel }), as above. The short form
fmttag('config', '625'); with the client ID alone also works; it leaves shopCountry and
channel unset. Then add the add to cart and order calls: see Step 3: Events.
On Shopify, use the pixel instead (see Shopify app).
Script URL and caching
Use the script URL exactly as shown. Do not add a cache buster such as ?_=<timestamp> or ?v=…: sdk.js and sr.js are refreshed within 5 minutes of every FitMyType release, and a cache buster only makes every page view download the script again.