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 #21491

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Conversation

letiescanciano
Copy link
Contributor

We weren't using the latest version of the snippet and because of that we are not able to send data correctly to some destinations that requires cloud mode

We weren't using the latest version of the snippet and because of that
we are not able to send data correctly to some destinations that
requires cloud mode (eg. Hubpsot actions)
@octavia-squidington-iv octavia-squidington-iv added the area/frontend Related to the Airbyte webapp label Jan 17, 2023
Copy link
Collaborator

@timroes timroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, have not tested locally. Just left a question, but otherwise looks fine.

}}();
!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 key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="${token}";;analytics.SNIPPET_VERSION="4.15.3";
analytics.load("${token}");
analytics.page();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THis wasn't there beforehand, do we need to call .page() once empty with the new version, or is this a leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's on the new script :)
Screen Shot 2023-01-18 at 3 28 15 PM

@letiescanciano letiescanciano merged commit fcf193d into master Jan 18, 2023
@letiescanciano letiescanciano deleted the leti/update-segment-snippet branch January 18, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp team/growth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants