{"componentChunkName":"component---src-templates-markdown-template-jsx","path":"/developers/client-sdks/web/upgrade-to-version-3/","result":{"data":{"pageMetadata":{"title":"Upgrade to Version 3 of the SDK","path":"/developers/client-sdks/web/upgrade-to-version-3/","sourceCode":null,"metadataParent":{"title":"Web","path":"/developers/client-sdks/web/","sourceCode":"https://github.com/mParticle/mparticle-sdk-javascript","hasVersionPicker":null,"metadataChildren":[{"title":"Initialization","path":"/developers/client-sdks/web/initialization/","order":2,"label":null},{"title":"Configuration","path":"/developers/client-sdks/web/configuration/","order":3,"label":null},{"title":"Content Security Policy","path":"/developers/client-sdks/web/content-security-policy/","order":3,"label":null},{"title":"Event Tracking","path":"/developers/client-sdks/web/event-tracking/","order":4,"label":null},{"title":"User Attributes","path":"/developers/client-sdks/web/users/","order":5,"label":null},{"title":"IDSync","path":"/developers/client-sdks/web/idsync/","order":6,"label":null},{"title":"Page View Tracking","path":"/developers/client-sdks/web/screen-tracking/","order":7,"label":null},{"title":"Commerce Events","path":"/developers/client-sdks/web/commerce-tracking/","order":8,"label":null},{"title":"Location Tracking","path":"/developers/client-sdks/web/location/","order":9,"label":null},{"title":"Media","path":"/developers/client-sdks/web/media/","order":10,"label":null},{"title":"Kits","path":"/developers/client-sdks/web/kits/","order":11,"label":null},{"title":"Application State and Session Management","path":"/developers/client-sdks/web/session-management/","order":12,"label":null},{"title":"Data Privacy Controls","path":"/developers/client-sdks/web/data-privacy-controls/","order":13,"label":null},{"title":"Error Tracking","path":"/developers/client-sdks/web/error-and-exception-tracking/","order":14,"label":null},{"title":"Opt Out","path":"/developers/client-sdks/web/opt-out/","order":14,"label":null},{"title":"Custom Logger","path":"/developers/client-sdks/web/custom-logger/","order":15,"label":null},{"title":"Persistence","path":"/developers/client-sdks/web/persistence/","order":16,"label":null},{"title":"Native Web Views","path":"/developers/client-sdks/web/native-webviews/","order":17,"label":null},{"title":"Self-Hosting","path":"/developers/client-sdks/web/self-hosting/","order":18,"label":null},{"title":"Multiple Instances","path":"/developers/client-sdks/web/multiple-instances/","order":19,"label":null},{"title":"Web SDK via Google Tag Manager","path":"/developers/client-sdks/web/gtm-templates/","order":20,"label":null},{"title":"Preventing Blocked HTTP Traffic with CNAME","path":"/developers/client-sdks/web/prevent-blocked-http-traffic/","order":21,"label":null},{"title":"Facebook Instant Articles","path":"/developers/client-sdks/web/facebook-instant-articles/","order":22,"label":null},{"title":"Troubleshooting the Web SDK","path":"/developers/client-sdks/web/troubleshooting/","order":23,"label":null},{"title":"Browser Compatibility","path":"/developers/client-sdks/web/browser-compatibility/","order":24,"label":null},{"title":"Linting Data Plans","path":"/developers/client-sdks/web/linting/","order":25,"label":null},{"title":"API Reference","path":"/developers/client-sdks/web/api-reference/","order":26,"label":null},{"title":"Upgrade to Version 3 of the SDK","path":"/developers/client-sdks/web/upgrade-to-version-3/","order":28,"label":null},{"title":null,"path":"/developers/client-sdks/web/changelog/","order":null,"label":null}],"metadataParent":{"title":"Client SDKs","path":"/developers/client-sdks/","metadataChildren":[{"title":"Alexa","path":"/developers/client-sdks/alexa/","order":1,"label":null},{"title":".NET MAUI","path":"/developers/client-sdks/maui/","order":null,"label":null},{"title":"AMP","path":"/developers/client-sdks/amp/","order":null,"label":null},{"title":"Android","path":"/developers/client-sdks/android/","order":null,"label":null},{"title":"Cordova","path":"/developers/client-sdks/cordova/","order":null,"label":null},{"title":"Direct Url Routing","path":"/developers/client-sdks/direct-url-routing/","order":null,"label":null},{"title":"Flutter","path":"/developers/client-sdks/flutter/","order":null,"label":null},{"title":"iOS","path":"/developers/client-sdks/ios/","order":null,"label":null},{"title":"React Native","path":"/developers/client-sdks/react-native/","order":null,"label":null},{"title":"Roku","path":"/developers/client-sdks/roku/","order":null,"label":null},{"title":"Unity","path":"/developers/client-sdks/unity/","order":null,"label":null},{"title":"Web","path":"/developers/client-sdks/web/","order":null,"label":null},{"title":"Xbox","path":"/developers/client-sdks/uwp/","order":null,"label":null}],"metadataParent":{"title":"Developers","path":"/developers/","metadataChildren":[{"title":"API Credential Management","path":"/developers/credential-management/","order":null,"label":null},{"title":"API References","path":"/developers/apis/","order":null,"label":null},{"title":"Client SDKs","path":"/developers/client-sdks/","order":null,"label":null},{"title":"Guides","path":"/developers/guides/","order":null,"label":null},{"title":"Media SDKs","path":"/developers/media-sdks/","order":null,"label":null},{"title":"Quickstart","path":"/developers/quickstart/","order":null,"label":null},{"title":"Server SDKs","path":"/developers/server-sdks/","order":null,"label":null},{"title":"The Developer's Guided Journey to mParticle","path":"/developers/developersjourney/","order":null,"label":null},{"title":"Tools","path":"/developers/tools/","order":null,"label":null}],"metadataParent":null}}}},"markdownRemark":{"html":"<p>Version 3 of the mParticle Web SDK is a major release that contains breaking changes from version 2.x. It removes several long-deprecated APIs and changes how kits are versioned and published to npm. Ignore this section if you are implementing the mParticle Web SDK for the first time and don’t need to upgrade from an older version.</p>\n<p>For the full changelog, see <a href=\"https://github.com/mParticle/mparticle-web-sdk/blob/main/CHANGELOG.md#300\">3.0.0 changelog</a> on GitHub.</p>\n<h2 id=\"summary-of-changes\" style=\"position:relative;\"><a href=\"#summary-of-changes\" aria-label=\"summary of changes permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Summary of Changes</h2>\n<ul>\n<li><strong>New snippet</strong>: Snippet customers replace their existing snippet with the <a href=\"/developers/client-sdks/web/initialization/\">latest snippet</a>, which points to version 3.</li>\n<li><strong>Unified versioning</strong>: The core SDK and every mParticle-hosted kit now share the same version number and are released together. If you install via npm, update the core SDK and all kit packages to the same version at the same time.</li>\n<li><strong>Kit package renames</strong>: Kits that support multiple major versions of a partner SDK now encode the partner SDK major version in the npm package name (for example, <code class=\"language-text\">@mparticle/web-braze-kit</code> becomes <code class=\"language-text\">@mparticle/web-braze-kit-6</code> or <code class=\"language-text\">@mparticle/web-braze-kit-5</code> for older versions of Braze).</li>\n<li><strong>Deprecated APIs removed</strong>: The Cart API, <code class=\"language-text\">logCheckout</code>, <code class=\"language-text\">logRefund</code>, and <code class=\"language-text\">removeCCPAState</code> have been removed. See <a href=\"#removed-apis\">Removed APIs</a>.</li>\n</ul>\n<h2 id=\"upgrading-via-snippet-cdn\" style=\"position:relative;\"><a href=\"#upgrading-via-snippet-cdn\" aria-label=\"upgrading via snippet cdn permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Upgrading via Snippet (CDN)</h2>\n<p>Version 3 is loaded with a new snippet. Rather than editing your existing snippet in place, replace it entirely:</p>\n<ol>\n<li>Remove the v2 snippet from your pages or templates.</li>\n<li>Copy the latest snippet from the <a href=\"/developers/client-sdks/web/initialization/\">initialization guide</a> and paste it into the <code class=\"language-text\">&lt;head&gt;</code> tag of every page of your web app, keeping any <code class=\"language-text\">mParticle.config</code> options you had customized in your v2 snippet.</li>\n<li>In the snippet, replace <code class=\"language-text\">REPLACE WITH API KEY</code> with your web API key. <a href=\"/developers/client-sdks/web/prevent-blocked-http-traffic/\">First-party (CNAME) domain instructions</a> don’t change - see the docs for instructions there.</li>\n</ol>\n<p>As with v2, kits for any integrations you have enabled in the mParticle UI are included automatically, so no kit-related action is needed. However, the <a href=\"#removed-apis\">removed APIs</a> below still apply — audit your code for usage of removed methods before you switch.</p>\n<h2 id=\"upgrading-via-npm-self-hosting\" style=\"position:relative;\"><a href=\"#upgrading-via-npm-self-hosting\" aria-label=\"upgrading via npm self hosting permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Upgrading via npm (Self-Hosting)</h2>\n<h3 id=\"update-the-core-sdk\" style=\"position:relative;\"><a href=\"#update-the-core-sdk\" aria-label=\"update the core sdk permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Update the Core SDK</h3>\n<p>Update <code class=\"language-text\">@mparticle/web-sdk</code> to version 3:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">npm</span> <span class=\"token function\">install</span> @mparticle/web-sdk@^3.0.0</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<h3 id=\"update-all-kits-together\" style=\"position:relative;\"><a href=\"#update-all-kits-together\" aria-label=\"update all kits together permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Update All Kits Together</h3>\n<p>In v2, each kit was versioned independently, so kit versions had no relationship to the core SDK version or to each other. In v3, all mParticle-hosted kits share the core SDK’s version number, and every kit is republished with each core SDK release, even if the kit’s code did not change.</p>\n<p>This means that when you upgrade the core SDK, you should upgrade <strong>all</strong> of your mParticle kit packages to the same version at the same time. As an example:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">npm</span> <span class=\"token function\">install</span> @mparticle/web-sdk@^3.0.0 <span class=\"token punctuation\">\\</span>\n  @mparticle/web-braze-kit-6@^3.0.0 <span class=\"token punctuation\">\\</span>\n  @mparticle/web-google-analytics-4-client-kit@^3.0.0 <span class=\"token punctuation\">\\</span>\n  @mparticle/web-onetrust-kit@^3.0.0</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Mixing a v3 core SDK with v2-era kit packages (or vice versa) is not supported. v3 kits declare a <code class=\"language-text\">peerDependency</code> on <code class=\"language-text\">@mparticle/web-sdk@^3.0.0</code>, so npm will warn you if your versions are misaligned.</p>\n<h3 id=\"kit-package-name-changes\" style=\"position:relative;\"><a href=\"#kit-package-name-changes\" aria-label=\"kit package name changes permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Kit Package Name Changes</h3>\n<p>Kits that support multiple major versions of a partner SDK now include the partner SDK’s major version in the package name. Choose the package that matches the partner SDK major version you use:</p>\n<table>\n<thead>\n<tr>\n<th>Integration</th>\n<th>v2 Package</th>\n<th>v3 Package</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Braze</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit</code> @ 3.x</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit-3</code> (Braze Web SDK 3.x)</td>\n</tr>\n<tr>\n<td>Braze</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit</code> @ 4.x</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit-4</code> (Braze Web SDK 4.x)</td>\n</tr>\n<tr>\n<td>Braze</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit</code> @ 5.x</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit-5</code> (Braze Web SDK 5.x)</td>\n</tr>\n<tr>\n<td>Braze</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit</code> @ 6.x</td>\n<td><code class=\"language-text\">@mparticle/web-braze-kit-6</code> (Braze Web SDK 6.x)</td>\n</tr>\n</tbody>\n</table>\n<p>In v2, the Braze kit encoded the Braze Web SDK major version in its own package version (for example, <code class=\"language-text\">@mparticle/web-braze-kit@6.x</code> wrapped Braze Web SDK 6.x). Because all v3 kits now share the core SDK’s version number, the partner SDK version moved into the package name instead.</p>\n<p>All other kit packages keep their existing names, but need to be installed with their respective version 3 instead.</p>\n<h2 id=\"removed-apis\" style=\"position:relative;\"><a href=\"#removed-apis\" aria-label=\"removed apis permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Removed APIs</h2>\n<p>The following deprecated APIs have been removed in v3. All of them have logged deprecation warnings since earlier v2 releases.</p>\n<h3 id=\"cart-api\" style=\"position:relative;\"><a href=\"#cart-api\" aria-label=\"cart api permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Cart API</h3>\n<p>The Cart API was deprecated in v2 and has been removed. This includes:</p>\n<ul>\n<li><code class=\"language-text\">mParticle.eCommerce.Cart.add()</code></li>\n<li><code class=\"language-text\">mParticle.eCommerce.Cart.remove()</code></li>\n<li><code class=\"language-text\">mParticle.eCommerce.Cart.clear()</code></li>\n<li><code class=\"language-text\">mParticle.Identity.getCurrentUser().getCart()</code> and all methods on the returned cart</li>\n</ul>\n<p>Log cart activity with <code class=\"language-text\">logProductAction</code> instead:</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-javascript line-numbers\"><code class=\"language-javascript\"><span class=\"token comment\">// Before (v2)</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span>Cart<span class=\"token punctuation\">.</span><span class=\"token function\">add</span><span class=\"token punctuation\">(</span>product<span class=\"token punctuation\">,</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span>Cart<span class=\"token punctuation\">.</span><span class=\"token function\">remove</span><span class=\"token punctuation\">(</span>product<span class=\"token punctuation\">,</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// After (v3)</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span><span class=\"token function\">logProductAction</span><span class=\"token punctuation\">(</span>mParticle<span class=\"token punctuation\">.</span>ProductActionType<span class=\"token punctuation\">.</span>AddToCart<span class=\"token punctuation\">,</span> <span class=\"token punctuation\">[</span>product<span class=\"token punctuation\">]</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span><span class=\"token function\">logProductAction</span><span class=\"token punctuation\">(</span>mParticle<span class=\"token punctuation\">.</span>ProductActionType<span class=\"token punctuation\">.</span>RemoveFromCart<span class=\"token punctuation\">,</span> <span class=\"token punctuation\">[</span>product<span class=\"token punctuation\">]</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h3 id=\"logcheckout-and-logrefund\" style=\"position:relative;\"><a href=\"#logcheckout-and-logrefund\" aria-label=\"logcheckout and logrefund permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>logCheckout and logRefund</h3>\n<p><code class=\"language-text\">logCheckout</code> and <code class=\"language-text\">logRefund</code> have been removed. Use <code class=\"language-text\">logProductAction</code> with the corresponding <code class=\"language-text\">ProductActionType</code>:</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-javascript line-numbers\"><code class=\"language-javascript\"><span class=\"token comment\">// Before (v2)</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span><span class=\"token function\">logCheckout</span><span class=\"token punctuation\">(</span>step<span class=\"token punctuation\">,</span> option<span class=\"token punctuation\">,</span> attrs<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span><span class=\"token function\">logRefund</span><span class=\"token punctuation\">(</span>transactionAttributes<span class=\"token punctuation\">,</span> product<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// After (v3)</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span><span class=\"token function\">logProductAction</span><span class=\"token punctuation\">(</span>mParticle<span class=\"token punctuation\">.</span>ProductActionType<span class=\"token punctuation\">.</span>Checkout<span class=\"token punctuation\">,</span> products<span class=\"token punctuation\">,</span> attrs<span class=\"token punctuation\">,</span> customFlags<span class=\"token punctuation\">,</span> transactionAttributes<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nmParticle<span class=\"token punctuation\">.</span>eCommerce<span class=\"token punctuation\">.</span><span class=\"token function\">logProductAction</span><span class=\"token punctuation\">(</span>mParticle<span class=\"token punctuation\">.</span>ProductActionType<span class=\"token punctuation\">.</span>Refund<span class=\"token punctuation\">,</span> products<span class=\"token punctuation\">,</span> attrs<span class=\"token punctuation\">,</span> customFlags<span class=\"token punctuation\">,</span> transactionAttributes<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h3 id=\"removeccpastate\" style=\"position:relative;\"><a href=\"#removeccpastate\" aria-label=\"removeccpastate permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>removeCCPAState</h3>\n<p><code class=\"language-text\">removeCCPAState</code> has been removed. Use <code class=\"language-text\">removeCCPAConsentState</code> instead:</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-javascript line-numbers\"><code class=\"language-javascript\"><span class=\"token comment\">// Before (v2)</span>\nconsentState<span class=\"token punctuation\">.</span><span class=\"token function\">removeCCPAState</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// After (v3) - Both methods existed on v2, but removeCCPAState was removed.</span>\nconsentState<span class=\"token punctuation\">.</span><span class=\"token function\">removeCCPAConsentState</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"upgrade-checklist\" style=\"position:relative;\"><a href=\"#upgrade-checklist\" aria-label=\"upgrade checklist permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Upgrade Checklist</h2>\n<ul>\n<li><strong>Snippet customers</strong>: Replace your v2 snippet with the <a href=\"/developers/client-sdks/web/initialization/\">latest snippet</a>, entering your API key (and CNAME domain, if you use one) at the top.</li>\n<li>\n<p><strong>npm customers</strong>:</p>\n<ul>\n<li>Update <code class=\"language-text\">@mparticle/web-sdk</code> to <code class=\"language-text\">^3.0.0</code>.</li>\n<li>Update every mParticle kit package to the same version as the core SDK, all at the same time.</li>\n<li>If you use the Braze kit, switch to the new package name (<code class=\"language-text\">@mparticle/web-braze-kit-&lt;major&gt;</code>). Amplitude stays <code class=\"language-text\">@mparticle/web-amplitude-kit</code>.</li>\n</ul>\n</li>\n<li>\n<p><strong>All customers</strong>: Audit your implementation for removed APIs:</p>\n<ul>\n<li>Replace any <code class=\"language-text\">eCommerce.Cart</code> or <code class=\"language-text\">user.getCart()</code> usage with <code class=\"language-text\">logProductAction</code>.</li>\n<li>Replace <code class=\"language-text\">logCheckout</code> and <code class=\"language-text\">logRefund</code> with <code class=\"language-text\">logProductAction</code>.</li>\n<li>Plan a migration from <code class=\"language-text\">logPurchase</code> (deprecated) to <code class=\"language-text\">logProductAction</code>.</li>\n<li>Replace <code class=\"language-text\">removeCCPAState</code> with <code class=\"language-text\">removeCCPAConsentState</code>.</li>\n</ul>\n</li>\n</ul>","frontmatter":{"title":"Upgrade to Version 3 of the SDK","order":28,"seoTitle":null,"seoDescription":null},"parent":{"__typename":"File","modifiedTime":"September 14, 2026"}}},"pageContext":{"slug":"/developers/client-sdks/web/upgrade-to-version-3/"}},"staticQueryHashes":["2950460867"]}