Developers
Browsers and ad-blocking technologies sometimes block mParticle tags and event collection endpoints. To prevent blocking and ensure maximum data collection, configure a first-party domain for event collection, and use it instead of the SDK default mparticle.com
domain.
To prevent this blocked HTTP traffic, create a custom subdomain and point that DNS record to mParticle. Traffic is less likely to be blocked because the domain matches the same root domain in the address bar.
Use this process to create a custom subdomain and point the DNS record to mParticle:
mp.mydomain.com
or mparticle.mydomain.com
. To contact mParticle, visit the mParticle Support site and submit a request.mydomain.com
in this example) has been configured previously, Fastly will need to obtain permission from the account owner or authorized point of contact prior to allowing mParticle to complete provisioning. In this case, an additional TXT DNS record will need to be created. Further details will be provided by mParticle at such time.window.mParticle = {
config: {
isDevelopmentMode: true,
v1SecureServiceUrl: 'mp.mydomain.com/webevents/v1/JS/',
v2SecureServiceUrl: 'mp.mydomain.com/webevents/v2/JS/',
v3SecureServiceUrl: 'mp.mydomain.com/webevents/v3/JS/',
configUrl: 'mp.mydomain.com/tags/JS/v2/',
identityUrl: 'mp.mydomain.com/identity/v1/',
aliasUrl: 'mp.mydomain.com/webevents/v1/identity/'
}
};
In addition, if you are using the JavaScript snippet to load the SDK, modify the line that includes mp.src
and use your domain instead. Don’t include this line in the Config object.
mp.src = "https://mp.mydomain.com/tags/JS/v2/" + t + "/mparticle.js";
Was this page helpful?