Multiple instances

In some cases, you may need to run two different EdgeTag instances on the same shop. This requires initializing each EdgeTag with a unique EdgeTag URL. Below are some examples of how to manage this situation. We recommend including the destination in all your calls from the start if you anticipate this scenario.

Initializing site A and B
import { init } from '@blotoutio/edgetag-sdk-js'

init({
    edgeURL: 'https://a.mysite.com',
    disableConsentCheck: true
})

init({
    edgeURL: 'https://b.mysite.com',
    disableConsentCheck: true
})
Will send PageView to both instances
import { tag } from '@blotoutio/edgetag-sdk-js'

tag('PageView')
Will send PageView only to instance A
import { tag } from '@blotoutio/edgetag-sdk-js'

tag('PageView', {}, {}, { destination: 'https://a.mysite.com' })

Last updated

Was this helpful?