Skip to content

Added dc.js support through script tag id and data attribute #51

Closed
wants to merge 15 commits into from

5 participants

@tomfuertes

refs pull request #33

@LinsBC
LinsBC commented Oct 17, 2013

Is this good to use yet? I have a client using GAS who wishes to integrate DoubleClick so wondering if I can advise him to implement this method?

@tomfuertes
@LinsBC
LinsBC commented Oct 17, 2013

Thanks Tom,

Should I be warning the client that this is in beta? And if so, any ideas when it might be migrated to the main version?

@BrianKatz
@tomfuertes

@LinsBC -- test it somewhere first w/ the Google Analytics Debugger (Chrome) and if pageviews fire it should be fine to be "out of beta"

@BrianKatz -- I coded a shim like this before at my past employ (30M visits / day between properties). We saw less than a 0.25% drop now that adblock whitelisted the dc.js file. The fallback seemed a bit overkill for it and sometimes double loaded / generated false positives. Would not recommend it for effort/priority.

@DarrenCarterMD

Thanks for this! I'm excited to start using the new version, but I'm afraid I'm not familiar enough with how github works to download new version. I checked the download and releases page, and the latest version 1.11.0 isn't listed.

https://github.com/CardinalPath/gas/downloads
https://github.com/CardinalPath/gas/releases

Will something be uploaded there, or do I need to do something in github to create the file(s)?

Sorry I'm such a noob!

@tomfuertes
@BrianKatz
@DarrenCarterMD
tomfuertes added some commits Oct 18, 2013
@tomfuertes tomfuertes added grunt-contrib-clean to build process 9834701
@tomfuertes tomfuertes added banner to min files 90578a1
@tomfuertes tomfuertes Merge remote-tracking branch 'origin/develop' into dc.js
* origin/develop:
  Outbound events are non-interactive now
  Allow negative event values
  Don't push GAS functions inside _gaq.
  Extra checks on the live handler, fixes issue with ie8
f0e7ca1
@tomfuertes tomfuertes lint 4d519dd
@tomfuertes tomfuertes getElementByID !== getElementById 9a2a8b7
@tomfuertes

Tested locally and confirmed it's loading dc.js! You can download the release candidate zip at this link: https://dl.dropboxusercontent.com/u/7795606/gas-1.11.0.rc2.zip

The new snippet for how to load it can be found here: https://gist.github.com/tomfuertes/7043966

For now you'll have to host your own gas.min.js somewhere until the pull request is merged and 1.11.0 is shipped to the CDN.

@tomfuertes

Ping @DarrenCarterMD and @LinsBC -- release candidate script is zipped and linked to in the comment above

@tomfuertes tomfuertes was assigned Oct 18, 2013
@LinsBC
LinsBC commented Oct 23, 2013

Thanks Tom. That's very helpful and much appreciated.

@DarrenCarterMD
@tomfuertes

O.o Thanks and apologies! The new build system doesn't handle ascii/unicode in the same way. I deprecated/removed the offending function/code. You can download the patched release candidate below:

https://dl.dropboxusercontent.com/u/7795606/gas-1.11.0.rc2.zip

-- ping @LinsBC per the @DarrenCarterMD bug report above.

@DarrenCarterMD
@tomfuertes

@DarrenCarterMD Sorry I pasted the old link in the original comment and edited it soon thereafter, but apparently not before the notification emails went out!

Try this one: https://dl.dropboxusercontent.com/u/7795606/gas-1.11.0.rc2.zip

One more time for @LinsBC

@LinsBC
@DarrenCarterMD
@tomfuertes

@DarrenCarterMD Sure, which urls?

@DarrenCarterMD

On these two sites, it's not working.
http://protectsmart.net
http://zokydoky.com

Both have the same errors from the Google Tag Manager extension in Chrome:
From Google Tag Manager:
Error: No HTTP response detected
Error: Missing ga.js script

On this site, the tag is working.
http://www.melroseorthodontics.com

There are a couple differences in implementation: 1) the script is in the body and not the head. 2) I also am using a hosted version of the script and don't have it locally. Could either be part of it?

Much thanks!

@tomfuertes

The first two urls don't actually reference an online script.

Change all of your current src's from ga.src = '//demo/js/gas.min.js'; to ga.src = '//s3.amazonaws.com/nycsem/gas.min.js'; like it is on the working site.

The universal analytics implementation on the first one is also missing a closing tag

@DarrenCarterMD

But the current src's do point to a local instance of the gas.min.js script. For example, http://protectsmart.net/demo/js/gas.min.js is present. Why doesn't the local implementation work?

Thanks for the catching the universal tracking tag issue!

@tomfuertes
  • Site 1: '//demo/js/gas.min.js'; points to http://demo/js/gas.min.js
  • Site 2: The second sites script wasn't copied over correctly and has some sort of re-minification problem
  • Site 3: Currently working and at the url mentioned above //s3.amazonaws.com/nycsem/gas.min.js
@DarrenCarterMD

That solves it all. I'll go with my hosted file.

Thanks, again!

@philippschneider

will the 1.11.0 gas.min.js will be brought to the CDN?
Will there be any changes in the documentation?

I can see no chnages on the main page since 1 year...

@tomfuertes

Working on this today! Have a PR with CDNJS (cdnjs/cdnjs#2207) to get 1.11.0 out on the CDN. I'll publish the 1.11.0 tag to master once that PR goes live.

Changelog Preview of 1.11.0 can be found here and/or read below: https://github.com/CardinalPath/gas/blob/17108967a02fc673ac1b27e15c370ee4b58fe122/CHANGELOG.md

1.11.0

  • Display Advertising (dc.js) support (9d4bb3e)
  • Build system moved to Grunt (f3921fc)
  • Removed _sanitizeString helper function (e042350)
  • Outbound events are non-interactive now (9585c4e)
  • Allow negative event values (ce4515c)
  • Don't push GAS functions inside _gaq. (18c5e79)
  • Extra checks on the live handler, fixes issue with ie8 (ae1d554)

cc @philippschneider

@tomfuertes

1.11.0 has landed! Pull request rebased and merged into develop/master

If you want to install/update, instructions can be found on the front page README

https://github.com/CardinalPath/gas

@tomfuertes tomfuertes closed this Nov 24, 2013
@tomfuertes tomfuertes deleted the unknown repository branch Nov 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.