benjaminhoffman / gatsby-plugin-segment-js

Gatsby plugin for segment.com's analytic.js snippet
https://www.npmjs.com/package/gatsby-plugin-segment-js
MIT License
40 stars 28 forks source link

Allow conditional setting of analytics.load() #17

Closed JamDevCore closed 4 years ago

JamDevCore commented 5 years ago

To comply with EU cookie law we wanted to halt the running of the analytics.load() until our users had accepted cookies. To do this we had to remove the analytics.load() from snippet and call it manually later in our app. This pull requests adds an additional setting to allow other folks to do this easily if they need to.

benjaminhoffman commented 5 years ago

nice. thanks for the PR! id like to write some tests for this repo and get this merged. unfortunately, this may take some weeks as i am in the middle of a house move. will do my best to move quickly. sorry! but big thanks nonetheless.

JamDevCore commented 5 years ago

No worries, happy to be contributing! If you need help in the future I am always up for pitching in.

ruiramos commented 4 years ago

Any plans for merging this in @benjaminhoffman ? Thanks! Hope you're enjoying your new place.

TomPridham commented 4 years ago

this should be resolved as of 3.4.0