> For the complete documentation index, see [llms.txt](https://safary-1.gitbook.io/safary-doc-2.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://safary-1.gitbook.io/safary-doc-2.0/connect-data/add-safary-script/via-google-tag-manager.md).

# Via Google Tag Manager

How to integrate your website with Safary script via Google Tag Manager

{% embed url="<https://www.loom.com/share/3b6ad5eb508a4898af61e4f89d0acbd5?sid=ca0df58f-c608-45ee-89ba-47b40ceb8e94>" %}

### How to integrate your website with Safary script via Google Tag Manager

1. First, once you have signed up, go to your Safary's home page (<https://app.safary.club/>). Under "**Integrate Safary snippet"** if you click on Hosted Tag, you should see something like:<br>

   <figure><img src="https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2FD3wQ6OUBlbsmK4LfwsM4%2Fimage.png?alt=media&amp;token=a8652038-4638-406d-b13e-a972d89b101f" alt=""><figcaption><p>Example of Safary's home page with the tracking script code</p></figcaption></figure>

2. Now click on the copy icon ![](https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2F5u2Z4OiZiAgrBLgcfXUz%2Fimage.png?alt=media\&token=8355adcd-69b1-4289-be7b-8ceab269682f) on the left of the code to copy the contents of the tracking script\
   \- You will paste to Google Tag Manager in the following steps.\
   \- Note that alternatively you can click on "Selfhosted Tag" and copy the contents there.

3. In your Google Tag Manager account, click on "Add a New Tag"\
   ![](https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2FPVQCYROmfR19lSo0RFMc%2Fimage.png?alt=media\&token=4803d055-7167-4531-b094-6cc0060a5018)

4. Click on "Tag Configuration" and select "Custom HTML" as the tag type:<br>

   <figure><img src="https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2FhvT276ikkTo4naqPnDhY%2Fimage.png?alt=media&amp;token=32604c38-f8e4-4690-a740-32c4e50d2071" alt=""><figcaption></figcaption></figure>

5. Paste the contents copied from the Safary page into the HTML field. It should like this:<br>

   <figure><img src="https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2Fn9lyFs8SV6VwmPRRuE2U%2Fimage.png?alt=media&amp;token=88fed17c-b632-43fa-837c-a14afc5fa4b7" alt=""><figcaption></figcaption></figure>

6. Now click on "Triggering" and then select "All Pages":<br>

   <figure><img src="https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2FA6XYkdmQouMXPzL9sL12%2Fimage.png?alt=media&amp;token=26e9969c-e99b-40fc-afd7-f0eab52980e4" alt=""><figcaption></figcaption></figure>

7. In the end, this is how the configuration should look like:<br>

   <figure><img src="https://113809370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsxTfTleoQARunjDGH9D2%2Fuploads%2F59bed8Xz79iK3CkxpBQN%2Fimage.png?alt=media&amp;token=6da50bc6-6385-4fc3-8d04-f53f05fdb64e" alt=""><figcaption></figcaption></figure>

8. Now just click on **Save** and you can **submit** the changes to GTM with the Safary Tag now included.
