Code Monkey home page Code Monkey logo

Comments (5)

philipwalton avatar philipwalton commented on June 8, 2024

The shouldTrackOutboundLink configuration option is provided so you can customize the outbound link logic yourself, and all the examples you listed above are supported through customization.

The default is a hostname match because that will work for the greatest number of people (i.e. there are a lot more people who host sites on subdomains suchs as wordpress.com or appspot.com than there are people who run a single site that spans multiple subdomains or TLDs).

The existing cross-domain support in analytics.js is not relevant to this issue. That case deals with client IDs, this case deals with links, they are different use cases.

from autotrack.

alexhass avatar alexhass commented on June 8, 2024

Are you able to implement the cross domain support like ga does? Not everyone should reinvent the wheel for this standard ga build-in stuff.

from autotrack.

philipwalton avatar philipwalton commented on June 8, 2024

Are you able to implement the cross domain support like ga does? Not everyone should reinvent the wheel for this standard ga build-in stuff.

I have no idea what you mean by this.

And as I said before: the existing cross-domain support in analytics.js is not relevant to this issue. That case deals with client IDs, this case deals with links, they are different use cases.

from autotrack.

alexhass avatar alexhass commented on June 8, 2024

I try to explain this. If I go into the Google Analytics website and configure cross domain tracking I need to enter the list of my cross domains. e.g. *.example.com, *.example.net, foo.example.org etc. Based on my entered domain list the tracking code is build and contains these names in a settings array.

e.g.
ga('linker:autoLink', ['source.com', 'destination.com']);

If users configure the Drupal GA module they confifure the same and the Drupal module creates the array of domains for them.

If I do not provide a list of domains to your script, how should it know what domain is in the cross domain list or not? Maybe you'd like to take a look into http://cgit.drupalcode.org/google_analytics/tree/js/google_analytics.js#n60 to get a better idea where I'm comming from. If a link points to a cross domain it must not track the click as an outbound click. If the link points to external and not my cross domains it can be logged as "Outbound links".

Where are you checking these autoLink array and conditionally track "Outbound clicks" or "nothing" if it is a cross domain link?

from autotrack.

philipwalton avatar philipwalton commented on June 8, 2024

Plugins in analytics.js do not have access to each other, so I can't see what values a user has configured on that plugin. Also someone could require the linker plugin after the outboundLinkTracker plugin, so either way you'd have to set the configuration on both.

I don't see why this is a problem for Drupal. Couldn't you configure the outboundLinkTracker's shouldTrackOutboundLink function with the same data captured from the GA module?

Would you prefer an option to specify a list of "local" domains, similar to the option in the linker:autoLink method?

from autotrack.

Related Issues (20)

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.