# Est-il possible de passer l'objet JSON postStream initial dans le datalayer GTM ?

**URL:** <https://meta.discourse.org/t/is-it-somehow-possible-to-pass-the-initial-poststream-json-object-into-the-gtm-datalayer/161035>\
**Category:** Development\
**Created:** [Août 16, 2020, 1:50 UTC](https://meta.discourse.org/t/is-it-somehow-possible-to-pass-the-initial-poststream-json-object-into-the-gtm-datalayer/161035 "2020-08-16T13:50:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [Août 18, 2020, 12:49 UTC](https://meta.discourse.org/t/is-it-somehow-possible-to-pass-the-initial-poststream-json-object-into-the-gtm-datalayer/161035/2 "2020-08-18T00:49:57Z")

</div>

> [@Terrapop](#):
>
> Est-il possible d’une manière ou d’une autre de transmettre l’objet du flux du premier message pour les pages de sujets à la couche de données GTM sans effectuer une autre requête AJAX comme je le fais actuellement avec une mauvaise solution de contournement ?

Si vous essayez d’envoyer les données associées à un événement Discourse, vous pourriez être en mesure d’utiliser l’approche décrite dans ce message : [Integrating Google Tag Manager with Google Analytics - #44](https://meta.discourse.org/t/setup-google-tag-manager-for-analytics/47335/44?u=simon_cossar).

Cela devrait fonctionner si vous essayez de capturer l’un des événements suivants :

- `post:created`
- `topic-notifications-button:changed`
- `topic:created`
- `page:bookmark-post-toggled`
- `page:like-toggled`

---

_[View the full topic](https://meta.discourse.org/t/is-it-somehow-possible-to-pass-the-initial-poststream-json-object-into-the-gtm-datalayer/161035)._
