Skip to content
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

Update segment script to support user consent #350

Open
jswheeler opened this issue Jun 4, 2020 · 2 comments
Open

Update segment script to support user consent #350

jswheeler opened this issue Jun 4, 2020 · 2 comments

Comments

@jswheeler
Copy link

Expected behavior

Describe.
The connect app should support the segment 4.1.0 javascript app to support user consent (below).

<script>
  !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var t=analytics.methods[e];analytics[t]=analytics.factory(t)}analytics.load=function(e,t){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.segment.com/analytics.js/v1/"+e+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=t};analytics.SNIPPET_VERSION="4.1.0";
  analytics.load("bkPtWMUMTYDhww2zsJluzxtdhtmSsyd9");
  analytics.page();
  }}();
</script>

Additionally,
The following process should be followed to implement consent manager
https://github.com/segmentio/consent-manager#standalone-script

Specifically:

  • The consent code should be included on the same page as this analytics script
  • The analytics.load function should be commented out.
  • The cookieDomain string should be set to topcoder.com

Actual behavior

Describe.
The current app is version 4.0.0.

Steps to reproduce the problem

Load any page.

Screenshot/screencast

Attach or link a resource.
this file needs to be updated.
https://github.com/appirio-tech/accounts-app/blob/dev/app/views/segment.io.jade

Environment

  • OS:
  • Browser (w/version):
  • User role (client, copilot or manager):
  • Account used:
@jswheeler
Copy link
Author

@mtwomey can I get a status on this?

1 similar comment
@jswheeler
Copy link
Author

@mtwomey can I get a status on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant