milesmcc / shynet

Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.
Apache License 2.0
2.93k stars 190 forks source link

Problems with tracking pixel in javascript static site generators #200

Closed haaavk closed 2 years ago

haaavk commented 2 years ago

I really like tracking pixel feature of Shynet. I tried to use it in vue based static site generator (Gridsome). It works similar to SPA. There is no full page load which cause problem with caching. Shynet-pixle-cache

I tried to solve it by appending url with query parameter but it caused new problem. Tracking pixel with query parameter is blocked by uBlock Shynet-pixel-blocked

Finally I solve it by adding new url in Shynet to accept random number inside tracking pixel address.

      path(
          "<service_uuid>/random/<random_number>/pixel.gif",
          ingress.PixelView.as_view(),
          name="endpoint_pixel_random",
      ),

Is there a better solution? Should I create PR with this new url?

haaavk commented 2 years ago

I think it isn't typical shynet use case so i'm closing this issue.