# 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="/files/4oNK1f3RCdlYy6FGrfQa" alt=""><figcaption><p>Example of Safary's home page with the tracking script code</p></figcaption></figure>

2. Now click on the copy icon ![](/files/cNvLOPxn451OqFIfMmd8) 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"\
   ![](/files/oo6msnt9wccKQwh45bxg)

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

   <figure><img src="/files/jo0tZpVxCDVAcL2r1KH7" 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="/files/qlU8tNz0pZ4LYbVNs9mJ" alt=""><figcaption></figcaption></figure>

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

   <figure><img src="/files/gOW3DQVR4MpLS4zqjavK" alt=""><figcaption></figcaption></figure>

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

   <figure><img src="/files/XhHkPHjd741aVUupcyXF" alt=""><figcaption></figcaption></figure>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://safary-1.gitbook.io/safary-doc-2.0/connect-data/add-safary-script/via-google-tag-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
