Coder Social home page Coder Social logo

ritwikga / dgtrack Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 13 KB

Track First, Last Attribution Parameters like landing page, date, month, UTM values along with pageview (per session/user) count on the website.

License: Apache License 2.0

JavaScript 100.00%

dgtrack's People

Contributors

ritwikga avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dgtrack's Issues

How to have these datalayer values available in the Page View tag?

Hi @RitwikGA

BIG thanks for sharing such awesome solution. It works really awesome and the info is so valuable.

I read 2 of your posts and set up custom dimension in GA too. Anyway, how to have these datalayer value (pageviewCount, Acquisition Source Acquisition Medium Acquisition Campaign Acquisition Landing Page Acquisition Date Acquisition Month) available in Page View tag?

  1. So pageview event will have these data? (Correct?)
    2.If I don't have an additional tag triggered on Event Trigger – ‘firstAttribution‘, but have a GA Page view tag with Acquisition Source custom dimensions, will Acquisition Source custom dimension will be recorded in GA if the Acquisition Source is available in data layer?

I found one trick to push datalayer to page view tag pasted below. But I dont know how to make it work with yours.

Thank you so much and have a great day.

      // Set the data model keys directly so they can be used in the Page View tag
      window.google_tag_manager[{{Container ID}}].dataLayer.set('browsingBehavior', payload);
      
      // Also push to dataLayer
      window.dataLayer.push({
        event: 'custom.navigation',
        browsingBehavior: payload
      });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.