File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 // https://robertsahlin.com/analytics-beacon-transport-mechanism-gotchas/
6767 // https://bugs.webkit.org/show_bug.cgi?id=193508
6868 var xhr = new XMLHttpRequest ( ) ;
69- xhr . open ( 'POST' , collectorUrl + '/com.snowplowanalytics/tp2' , true ) ;
69+ xhr . open ( 'POST' , collectorUrl , true ) ;
7070 xhr . setRequestHeader ( 'Content-Type' , 'text/plain' ) ;
7171 xhr . withCredentials = true ;
7272 xhr . send ( 'unlockBeacon' ) ;
Original file line number Diff line number Diff line change 3939 isString = require ( 'lodash/isString' ) ,
4040 map = require ( 'lodash/map' ) ,
4141 localStorageAccessible = require ( './lib/detectors' ) . localStorageAccessible ,
42+ beaconiOSWorkaround = require ( './lib/beacon_ios_workaround' ) ,
4243 helpers = require ( './lib/helpers' ) ,
4344 object = typeof exports !== 'undefined' ? exports : this ; // For eventual node.js environment support
4445
314315 }
315316 const blob = new Blob ( [ encloseInPayloadDataEnvelope ( attachStmToEvent ( batch ) ) ] , headers ) ;
316317 try {
318+ beaconiOSWorkaround . unlockBeacon ( configCollectorUrl ) ;
317319 beaconStatus = navigator . sendBeacon ( configCollectorUrl , blob ) ;
318320 }
319321 catch ( error ) {
Original file line number Diff line number Diff line change 4545 links = require ( './links' ) ,
4646 forms = require ( './forms' ) ,
4747 errors = require ( './errors' ) ,
48- beaconiOSWorkaround = require ( './lib/beacon_ios_workaround' ) ,
4948 requestQueue = require ( './out_queue' ) ,
5049 coreConstructor = require ( 'snowplow-tracker-core' ) . trackerCore ,
5150 productionize = require ( './guard' ) . productionize ,
21392138 */
21402139 apiMethods . setCollectorUrl = function ( rawUrl ) {
21412140 configCollectorUrl = asCollectorUrl ( rawUrl ) ;
2142- beaconiOSWorkaround . unlockBeacon ( configCollectorUrl ) ;
21432141 } ;
21442142
21452143 /**
You can’t perform that action at this time.
0 commit comments