To navigate to the page go to Settings > Content > Priority data providers from the left-hand menu.Ĭlick on the button "Get script" and copy the code from the pop-up. You can find your version of the Siteimprove Analytics script on the Priority data providers page on the platform (Requires login). Priority)Ĭustomers not subscribed to Analytics can still take advantage of our Priority features. For customers not subscribed to Analytics (i.e. It is likely you will need to take one of the following approaches in order to get the Siteimprove Analytics JavaScript on your site. If you use CSP, please configure it to allow the Siteimprove script. Also, JavaScript can be blocked by a content security policy (CSP) configured to prevent unwanted cross-site-scripting. Note: We recommend that the JavaScript is always added at the bottom of the website in a footer or similar, just before the closing HTML body tag. The Siteimprove Analytics JavaScript is asynchronous which means it will not affect your website’s performance, can work seamlessly with other JavaScript, and is not required to be placed in a specific location on your website. The code will need to be added to all pages that you want to track. You can use this same Analytics JavaScript code no matter how many websites you are tracking with Siteimprove Analytics. Note: The 'XXXXX' in the code below represents a numeric code that is specific to your account so Do Not use this exact code below. To navigate to the page go to Analytics > Analytics Settings > Tracking > Analytics Script from the left-hand menu.Įxample of Siteimprove Analytics JavaScript code: You can find your version of the Siteimprove Analytics script on the Analytics Script page on the platform (Requires login). Note: Only Administrators and Account owners have access to the Analytics Script page in the platform. Reach out to Siteimprove technical support if you have any questions regarding the code. For customers not subscribed to Analytics (i.e Priority).(For information on adding a site see: How do I add a site to my Siteimprove subscription?) The code can also be found in the platform when you select a site using the Analytics site selector, that has an Analytics subscription but does not have the code. The code will be sent once you subscribe or request a trial for Analytics. Wgthost.appendChild(new HTMLInclude("./partials/mywidget.In order to use Analytics (or Priority) on your website, you will need to add the Siteimprove Analytics JavaScript code. let wgthost = document.getElementById("tgt") This element can also be created from JS by passing it the URL to the import file. This is what it looks like incorporated in a page: ĬSS styles should be properly applied to the newly imported HTML. The setTimeout() was necessary because this.textContent, if accessed too early, can include all the preceding text of the page (seen on Chrome/Chromium). = await rsp.text() Ĭfine("html-include", HTMLInclude) Throw new Error(`Failed to load file ($) for. Throw new Error("URL missing between tags.") The element implementation's a little trickier: #. The other solution uses the src attribute instead./partials/toolbar.html This is similar to another custom tag solution, but this one uses the text between the opening and closing tags as the include path/url.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |