Coder Social home page Coder Social logo

Comments (4)

zachrnolan avatar zachrnolan commented on May 28, 2024

Actually looks like my pageviews aren't working either. If anyone can help me out, would be greatly appreciated!

from redux-beacon.

zachrnolan avatar zachrnolan commented on May 28, 2024

Ahh, didn't have the segment script loaded in my html head. It's late =/

from redux-beacon.

ttmarek avatar ttmarek commented on May 28, 2024

Hahaha @zachrnolan no worries, happens to all of us!

On a serious note, this makes me think we should throw a little warning or an error to the console warning devs that they probably haven't added the segment tag to their page. Here's what I'm thinking.

  1. Add a test here. The test would set window.analytics = undefined, and it would expect(() => Segment()).toThrow('some helpful error message'). Very similar to the check we have in the Google Analytics target (last test).
  2. In the target, write a check to ensure that if the window is defined, then window.analytics exists. If it doesn't then throw the error. Make the test pass.

Let me know if you want to take this on. If not, then I'll make an issue for it.

from redux-beacon.

zachrnolan avatar zachrnolan commented on May 28, 2024

Thanks for the outline @ttmarek, I went ahead and created a PR for this here: #108. Let me know if any improvements can be made.

from redux-beacon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.