-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Analytics supporting changes and infrastructure. #277
base: dev
Are you sure you want to change the base?
Conversation
|
This Pull request is for @ageddesi to see what I managed to get working. Getting it working locally is somewhat of a challenge, FIrstly you need an address that ISN'T localhost - so running this locally you will need a host file entry - depending on your envurinment add an entry in yourt host file. I have been testing this with the following host entry 127.0.0.1 MockedApi.local You will need a plausible.conf file - an example is included. You will need a secret - most of this is taken from : https://plausible.io/docs/self-hosting create a secret and add it to the .plausible configuration file
now stand the docker-compose file up - at the end of this you should have the following conainers running I turned off mockedAPI as I run locally you can connect to plausible at : http://localhost:8000/ you can connect to the API at http://mockedapi.local:3000/ logging into plausible you need to add a website - so add a site for mockedpi.local. There is a Javascript file that needs to be added (i created custom.js to register that - will work on making it more generic) - which should send the request to plausible. hope these somewhat hasty instructions are going to b ok for you. |
gotchas : Make sure you browse to http://mockedapi.local:3000 - if you hit localhost:3000 then the adress that will be passed to plausible will be ignore and you'll see no traffic |
what's wrong with this pr?? |
I had been chatting to @ageddesi about analytics - and he asked for a PR to see what I had managed to do - I had some questions or thoughts about how we log visits to API end points. |
The tests are failing because the middleware I have developed for analystics is having some problem with environment settings. |
- it needs to load if enabled or not test. - Added an interface to describe the payload for Plausible (and potentially others)
I am determined to get the MD errors down to 0.
I am rebasing this branch and will update as soon as I pick apart what has changed since I first set up this branch |
Pull request template
IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.
Describe your changes
Link to issue this resolves
Screenshot of changes(if relevant)