---
title: "Integrate Whatfix with Google Tag Manager using JavaScript"
slug: "google-tag-manager"
updated: 2024-09-19T05:28:53Z
published: 2024-09-19T05:28:53Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.whatfix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Whatfix with Google Tag Manager using JavaScript

[Embedded content](https://cdn.whatfix.com/prod/45dba1cc-fb59-4dee-ab37-a68ac38ca9ad/deck.html?closeable=false&amp;stage=production&amp;state=null&amp;true=undefined&amp;preview_mode_enabled=false&amp;entId=45dba1cc-fb59-4dee-ab37-a68ac38ca9ad&amp;nolive=1&amp;data-wfx-namespace=main_%24#!/64c4df8d-0e80-4af4-b4e1-2f789ea9c1f1/)

### How to pass custom variables from Google Tag Manager to Whatfix?

To pass on custom variables, add the following code snippet to the Whatfix tag;

```
<script language='javascript' async='true' type='text/javascript'>
    window._wfx_data = {
        "data_type1": {{tag value1}},
        "data_type2": {{tag value2}}
    };
</script>
```

## Related

- [Integrations](/integrations.md)
