Linking Countly and my WebApp
Hello everyone,
I am new to Countly and would like to test it on a basic web application.
To install Countly, I followed the guide (https://resources.count.ly/docs/installing-countly-server) and used Docker. So, basically, I just wrote those 2 commands:
docker pull countly/countly-server
docker run -d -p 32768:80 countly/countly-server
So, Countly (Community Edition v19.08) is running locally on my laptop and I can have access to it through the URL http://localhost:32768 in any browser.
I created my account and my app and added the javascript tracking code in index.html (the HTML file of my app which is running locally and that I have access to it through the URL localhost), following the help provided by the Code Generator for SDK Integration.
But, when I go on the URL of my webapp, I see no visits on Countly. So it seems that Countly isn't tracking anything from my app and I don't know if I did something wrong or if I forgot a step in the configuration of the tools...
Here 2 screenshots: one is from the management app window from Countly and the other is from my index.html file.
Do not hesitate to ask me any more details if needed to answer to my question.
Thanks for reading me
Comments
Hello,
can you please enable debug on Web SDK and check what it outputs in console logs?
Possibly if you are running web page locally, it may have some restrictions from browser
I just found the reason of the problem.
The path that I was putting for the src attribute was not correct because I have no folder named web/sdk/... when I installed Countly with Docker.
I just modified it and put a CDN found on this URL (https://github.com/Countly/countly-sdk-web) and now it works, Countly seems to track my app because one visit appeared on the tool.
Thanks for your help 👍
How did you add the CDN part
Please sign in to leave a comment.