posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

'img' config option does not work

Open macobo opened this issue 4 years ago • 2 comments

img config option is supposed to create an image tag and do a request to the server based on the url in src attribute.

Sending the request almost works, except it doesn't encode the event name or properties into the url it generates.

macobo avatar Nov 29 '20 16:11 macobo

Actually, sending data via XHR GET would fail for the same reason.

The bug is the same for both - we should put the data into the URL via args: https://github.com/PostHog/posthog-js/blob/master/src/posthog-core.js#L409-L411

Haven't tested if this would work on posthog-side though.

@timgl @mariusandra thoughts on this? Shall we a) fix this or b) drop the unsupported behavior?

macobo avatar Dec 03 '20 10:12 macobo

I'd drop. We're not really targeting IE8 or whoever anymore. Making a bunch of DOM nodes just to send GET requests seems silly.

mariusandra avatar Dec 03 '20 10:12 mariusandra

This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.

posthog-bot avatar Apr 05 '23 09:04 posthog-bot

This issue was closed due to lack of activity. Feel free to reopen if it's still relevant.

posthog-bot avatar Apr 20 '23 09:04 posthog-bot

removed in #651

pauldambra avatar May 30 '23 10:05 pauldambra