Source: https://nishanth-fern-test.docs-staging.pageloop.ai/web/google-tag-manager

# Integrate Whatfix with Google Tag Manager using JavaScript

[Embedded content](https://cdn.whatfix.com/prod/45dba1cc-fb59-4dee-ab37-a68ac38ca9ad/deck.html?closeable=false\&stage=production\&state=null\&true=undefined\&preview_mode_enabled=false\&entId=45dba1cc-fb59-4dee-ab37-a68ac38ca9ad\&nolive=1\&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;

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

## Related

- [Integrations](/web/integrations)
