In this tutorial we show you how you can easily integrate the tracking code of Friendly Analytics on your website.

1. Find out your site ID

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):

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/699cdeb8-65eb-4e3f-a9d3-0f0917c4af79/Untitled.png

Then please scroll down to the item "JavaScript tracking code". There you will find your site ID. It is a simple number:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a362d6e9-ae1a-44ff-bc5d-c989666114df/Untitled.png

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.

2. Embed tracking code on website

After you have determined your Site ID, you can easily integrate the tracking of Friendly Automate into your website.

You use WordPress? Then just scroll on to section 2b.

2a. Embed tracking code manually

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:

Untitled

You would then have to embed the code on every page of your website - ideally directly before the closing </body> tag.

Done :)

Powered by Fruition