# Google Tag Manager - override page-tracking.es6.js

**URL:** <https://meta.discourse.org/t/google-tag-manager-override-page-tracking-es6-js/74521>\
**Category:** Development\
**Created:** [Novembre 21, 2017, 4:11 UTC](https://meta.discourse.org/t/google-tag-manager-override-page-tracking-es6-js/74521 "2017-11-21T16:11:01Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Mathieu](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@Mathieu](https://meta.discourse.org/u/Mathieu)\
**Post date:** [Novembre 21, 2017, 4:11 UTC](https://meta.discourse.org/t/google-tag-manager-override-page-tracking-es6-js/74521/1 "2017-11-21T16:11:01Z")

</div>

Hello there 🙂

I’m working with Google Tag Manager and there is something I don’t understand on your implementation:

When I load the first page, I have two events sent:

- a « Page View » event;
- a « VirtualPageView » event.  
Then, on all page changes:
- a « VirtualPageView » event.  
Why are you sending two events on the first page load?

I tried to override your `page-tracking.es6.js` in the initializers folder by creating a plugin which includes the same file in `assets/javascripts/initializers/` but this doesn’t work and your file is executed, not mine. Maybe I’m not doing things good to override one of initializers file. What should I do?

I don’t know what can I do to do that so if someone can help me… thanks 🙂

Mathieu.

---

_[View the full topic](https://meta.discourse.org/t/google-tag-manager-override-page-tracking-es6-js/74521)._
