Skip to content
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

Support for websites (static, wordpress, framer, etc) #13

Open
goenning opened this issue Jun 3, 2023 · 4 comments
Open

Support for websites (static, wordpress, framer, etc) #13

goenning opened this issue Jun 3, 2023 · 4 comments
Labels
feature request New feature or request

Comments

@goenning
Copy link
Member

goenning commented Jun 3, 2023

Aptabase was built targeting mobe and desktop apps. There's support for web apps, but it doesn't work well for plain websites like static sites, wordpress, framer etc.

The platform has all the foundation to support websites too, so it might be worth looking at it in future.

@goenning goenning added the feature request New feature or request label Jun 3, 2023
@mountainash
Copy link

I've created a Cloudflare Worker that, when called from Zaraz with a POST JSON will pass on the hit to Aptabase.

Feel free to edit as needed: https://gist.github.com/mountainash/94cc7bb56d6702e6d127c340e75c1419

Zaraz can also be used without Cloudflare DNS transfer, so by adding a script to the HTML, services like Framer, Wix and Webflow could also work [for more than just page views too].

@goenning
Copy link
Member Author

Hey @mountainash thanks for sharing this, I love seeing how people are using and extending the platform :)

The only 2 issues I can see with this solution is:

  • You're using the ip address as the sessionId. Sessions are meant to be short-lived (less than a day). And everything within Aptabase is built around that. You'll probably see sessions that last for weeks/months, and that's not ideal.
  • be careful with storing the IP address on props, that's PII and something we actually encourage people not do to.

The first issue will become easier to solve when we implement server-side session management ( #33 ), for now I don't really thing there's a nice way to solve it. You could alternatively set a random ID as your session ID though, but that'd mean there'd only be one pageview per session, which is also not ideal.

@mountainash
Copy link

Thank you for taking the time to review it and give some very valid feedback! 💭

In my case - it's for very low trafficked sites - so I'm ok with the IP (which in the world of VPN's and proxies is anyone's guess as to who "owns" it...), but yes a random number could be used as a replacement (with the previously mentioned downside).

I've added some comments on the gist based on your suggestions.

@ZachHandley
Copy link

Couldn't we technically persist a random identifier to the local storage and use that to track the session length (assuming of course we don't track anything related to who the user is)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants