Workflow 1 - Install the SDK to your project Self-hosting allows you to use your preferred CDNs and minification strategies so you can optimize for fast delivery in key locations, as well as minimizing the number of round-trip requests required to load your page. You want granular control over page load speed.Note that while the core mParticle SDK can be bundled, most integration kits still rely on fetching third-party SDKs dynamically. Installing the SDK via NPM allows you to specify which version of the mParticle SDK and any kits you want to include in your project. For security reasons, you don’t want to add any externally hosted code to your page at runtime.There are two key reasons why you might want to self-host: However, from version 2.9.5 of the Web SDK, mParticle gives you the ability to self-host the SDK, by installing it to your JavaScript project via NPM. This snippet automatically fetches the necessary code for the core mParticle web SDK, plus the necessary client-side code for any enabled integrations, from mParticle’s CDN.įor most clients, including the snippet on their page, as detailed in the Getting Started section, will be the best way to instrument their web properties. The most common way of including mParticle’s JavaScript code on your webpage is by embedding our snippet in the tag of your page.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |