New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track Outbound Links doesn't appear to be functioning #921
Comments
The documentation provided by Google here https://support.google.com/analytics/answer/1136920?hl=en requires the onclick attribute is added to all links which we can't do. I believe that we came up with a different solution using JavaScript when this feature was implemented. It's possible that this JavaScript no longer does what we think it should. However, theres code called Autotrack which we could use - see the note from Google (https://developers.google.com/analytics/devguides/collection/analyticsjs/events) below: Developers wanting to track outbound links and forms can use autotrack, which includes the outboundLinkTracker and outboundFormTracker plugins that handle these complexities for you. See the autotrack documentation for usage and installation instructions. Here's the link to autotrack - https://github.com/googleanalytics/autotrack |
Here's the current JavaScript we output for outbound link tracking. @amostajo is going to review this and see if there's something wrong with this and see if Autotrack will work instead.
|
@wpsmort that piece of code is enabled only if two settings are on.., |
@amostajo You can find both options under All in One SEO > General Settings > Google Settings. The first is Advanced Analytics Options which is a radial. Once this is set to Enabled you'll see the second which is Track Outbound Links. https://semperplugins.com/documentation/advanced-google-analytics-settings/ |
…e Analytics features Refactored to work with autotrack.js, more Google Analytics features and code was optimized in some module methods.
This PR #931 adds a number of new options to the Google Settings section. We discussed on Slack whether these should be included or be held back. I believe they should be held and just the option for Track Outbound Links should be included for now. |
Removed unnecessary spacing created for code indentation and fixed issue with domain list.
Extra `autotrack.js` options are removed from free and filters were created so these are enabled for pro.
@wpsmort fixes and changes applied ready for testing. I have created a pro PR for this as well. Please test. |
@amostajo I have tested both PRs and they are both good.
Can you change this so it looks like this with the correct indenting as well:
|
Fixed end of line for autotrack, so AIOSEOP comment is displayed below and with the right indent.
@wpsmort Let me know if the indent pushed works |
@amostajo Thanks, this is tested and is good. |
#931) * #921 Refactored to work with autotrack.js and more Google Analytics features Refactored to work with autotrack.js, more Google Analytics features and code was optimized in some module methods. * #921 Removed unnecessary HTML spacing and fixed domain Removed unnecessary spacing created for code indentation and fixed issue with domain list. * #921 Removes extra options from free Extra `autotrack.js` options are removed from free and filters were created so these are enabled for pro. * Update readme tags (#1114) * update php requirement (#1115) * #921 EOF Indent fix Fixed end of line for autotrack, so AIOSEOP comment is displayed below and with the right indent.
This can be confirmed on our own sites where no outbound links show up since about April or May of 2014.
We should have an event category "Outbound Links" with the action being the URL in google analytics, but it's not there.
https://support.google.com/analytics/answer/1136920?hl=en
The text was updated successfully, but these errors were encountered: