Giter VIP home page Giter VIP logo

Comments (12)

Semperverus avatar Semperverus commented on August 26, 2024 1

Bingo, that was it. Got data coming in now! Also, one other thing that might need clarification: I know the script tag can go just about anywhere, but when reading your instructions, I wasn't sure if you wanted it to be more like:

<head>
<script></script>
</head>

or more

</head>
<script></script>
<body>

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024 1

from freshlytics.

Th3Whit3Wolf avatar Th3Whit3Wolf commented on August 26, 2024 1

That fixed it. Thank you! Also it would be cool if you could set the url in docker-compose via an environment variable, then all the user would have to do is copy the code.

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024

@Th3Whit3Wolf Can you see if you've added the base URL in the tracking snippet? [1]

Is there calls being made to /collect endpoint in the browser DevTools? If you don't mind, can you share the websites so I can take a look?

[1] https://freshlytics.gitbook.io/docs/screenshots#settings-setup-project

from freshlytics.

Th3Whit3Wolf avatar Th3Whit3Wolf commented on August 26, 2024

It has been added.

Here's site 1 and site 2

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024

This needs to point to the server running freshlytics

Screenshot 2019-09-03 at 6 43 18 AM

from freshlytics.

Semperverus avatar Semperverus commented on August 26, 2024

This needs to be made more clear in the instructions. Also, I'm running it right now with it pointing towards my freshlytics instance and it still isn't tracking.

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024

This needs to be made more clear in the instructions.

@Semperverus Thanks, will do πŸ‘

Also, I'm running it right now with it pointing towards my freshlytics instance and it still isn't tracking.

Can you do a curl? What does the response contain?

from freshlytics.

Semperverus avatar Semperverus commented on August 26, 2024

CURL:

<html>
    <head>
        <title>CHB</title>
        <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
                <link href="style.css" rel="stylesheet" type="text/css" />
                <script>
                  (function() {
                        var COLLECT_URL = "https://analytics.chb.cx/collect";
                        var PROJECT_ID = "JLENJ86VDF";
                        var GLOBAL_VAR_NAME = "__freshlytics__";

                        window[GLOBAL_VAR_NAME] = {};

                        window[GLOBAL_VAR_NAME].sendPageView = function() {
                          var path = location.pathname;
                          var referrer = document.referrer;

                          var url =
                                COLLECT_URL +
                                "?project_id=" +
                                PROJECT_ID +
                                "&path=" +
                                encodeURIComponent(path) +
                        "&referrer=" +
                        encodeURIComponent(referrer);

                          var xhr = new XMLHttpRequest();
                          xhr.open("GET", url);
                          xhr.send();
                        };

                        window[GLOBAL_VAR_NAME].sendPageView();
                  })();
                </script>
    </head>
<body>
    <div id=logo>CHB</div>
    
    <div id=nav>
        <h1>Navigation</h1>
<a href="https://chb.cx/"><div class="mini" id=chb_mini></div>About</a>
<a href="https://chb.cx/guild.php"><div class="mini" id=guild_mini></div>Guild</a>
<br />
<a href="https://forum.chb.cx"><div class="mini" id=forum_mini></div>Forum</a>
<a href="https://chat.chb.cx"><div class="mini" id=chat_mini></div>Chat</a>
<a href="https://wiki.chb.cx"><div class="mini" id=chb_mini></div>Wiki</a>
<a href="https://chb.cx/mumble.php"><div class="mini" id=mumble_mini></div>Mumble</a>
<br />
<a href="https://steamcommunity.com/groups/CHB"><div class="mini" id=steam_mini></div>Steam</a>
<a href="https://www.reddit.com/r/CHB/"><div class="mini" id=reddit_mini></div>Reddit</a>
<a href="https://plus.google.com/communities/100001248492735903453"><div id=googleplus_mini class="mini"></div>Google+ Community</a>
<br />
<a href="images/qr.png"><div class="mini" id=qr_mini></div>QR Code</a>
<br />
    </div>
    
    <div id=content>
        <h1>Welcome to CHB!</h1>
        CHB is a multi-functional website, offering many services for friends and family of the CHB group. We offer chat services, cloud storage, E-Mail, a social hub, a forum, a wiki, and more.<br />
        <br />
        <i>It is important to note that all services on CHB have separate accounts. This is due to the differences in software used to provide each service, preventing the unification of a single account. Please keep this in mind when using CHB and managing passwords. If you'd like separate passwords per service, this is also possible.</i><br />
        <h2>About CHB</h2>
        CHB started back in 2004 by Devin Prince, a.k.a. Semperverus, and friends. The acronym "CHB" actually has no meaning, and is just pronounced "Cee-Ache-Bee". Likewise, the group itself has no one particular focus. We generally like games of all sorts. See our guild page for more info.<br />
        <br />
        Honorable mentions for filling in the CHB acronym have included "Come Have Beers" (our current guild name), and "Chronic Hepatitis-B" (provided by AtlasRune). These are all unofficial, and you can make up your own if you like.<br />
        <br />
        Fun fact: CHB was founded before XKCD (2006), making us the first site/group to use meaningless acronyms.
    </div>

</body>
</head>
</html>

Screenshot_20190902_174957

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024

@Semperverus @Th3Whit3Wolf Terribly sorry, I think I've found the reason. The endpoint is at BASE_URL/api/collect not BASE_URL/collect. πŸ˜”

Can you update the tracking snippet to this new url? I'll update the codebase and documentation later 😊

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024

Yes, that would be a better UX πŸ‘

from freshlytics.

sheshbabu avatar sheshbabu commented on August 26, 2024

Have made the fix and pushed to Docker Hub πŸ‘

Also added entry in troubleshooting docs - https://freshlytics.gitbook.io/docs/troubleshooting#i-cant-see-the-events

from freshlytics.

Related Issues (15)

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.