In this tutorial we show you how you can easily integrate the tracking code of Friendly Analytics on your website.
To determine your site ID, please go to the Friendly Analytics settings (via the cogwheel in the top right corner) and click on "Tracking Code" in the left menu. Make sure that the correct domain is selected under "Website" (if you are tracking multiple websites):
<aside> 💡 You could customize the tracking code displayed using the options on the page and use it directly. But we recommend to use our customized tracking code or our own WordPress plugin at the next step. This way you can make sure that your tracking is configured for optimal privacy.
After you have determined your Site ID, you can easily integrate the tracking of Friendly Automate into your website.
<aside> 💡 You use WordPress? Then just scroll on to section 2b.
The optimized tracking code of Friendly Analytics consists of only one line of code. To use it, simply replace the number "123" with your site ID (twice).
🇨🇭 If hosted in Switzerland:
<script id="friendlyanalytics-123" src="<https://cdn.friendlyanalytics.ch/fa.js>" ></script><noscript><img src="<https://app.friendlyanalytics.ch/fa123.gif>"/></noscript>
🇪🇺 🇩🇪 If hosted in the European Union (Germany):
<script id="friendlyanalytics-123" src="<https://cdn.friendlyanalytics.com/fa.js>" ></script><noscript><img src="<https://app.friendlyanalytics.com/fa123.gif>"/></noscript>
If your site ID was "3" and you would use hosting in Switzerland, the code should look like this:
You would then have to embed the code on every page of your website - ideally directly before the closing </body> tag.