Skip to content

wrapper does not define SNIPPET_VERSION: Segment falls back to automatic initial page view #22

Description

@jrencz

Segment started versioning its snippet. Right now it's 3.1.0 according to https://segment.com/docs/sources/website/analytics.js/quickstart/

What's important is that they moved the initial page view tracking from the analytics.js to the snippet.
But if there's no SNIPPET_VERSION they fall back to the old behaviour.

I noticed that I'm tracking initial page view twice in my angular 1.5 app where I call segment.page() in $stateChangeSuccess handler.

I reviewed the code that loads analytics.js and I saw no major differences.
@aleross can you review the code as well and verify it's safe to just add analytics.SNIPPET_VERSION = '3.1.0'?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions