Skip to main content

Web Installation

Add the following script to your page's <head> element. This will load the script in parallel with the page and execute it immediately once it's ready.

<script>
(function (w, d, s, o, f, a, js, fjs) {
w[o] = function () {
(w[o].q = w[o].q || []).push(Array.prototype.slice.call(arguments));
};
((js = d.createElement(s)), (fjs = d.getElementsByTagName(s)[0]));
js.id = o;
js.src = f;
js.async = 1;
js.setAttribute('data-widget-id', a.id);
js.setAttribute('data-variant', a.variant);
w[o + '_context'] = a.context;
w[o + '_options'] = a.variantOptionOverrides;
w[o + '_trackingParameters'] = a.trackingParameters;
fjs.parentNode.insertBefore(js, fjs);
})(
window,
document,
'script',
'_asurion_widget',
'https://asurion-widget.prd.aws.service-initiation.asurion.com/widget-loader.js',
{
id: '<WIDGET_ID>',
variant: '<WIDGET_VARIANT>',
// ...additional configuration options (see below)
}
);
</script>

Configuration Options

OptionTypeRequiredDescription
idstringtrueYour unique widget identifier provided by Asurion
variantstringtrueWidget variant type. See Variant Options below
parentElementIdstringfalseID of the DOM element to append the widget to. Defaults to 'body'
contextobjectfalseAdditional context data to pass to the widget. Can contain any key-value pairs
trackingParametersobjectfalseTracking parameters that will be appended to external links within the widget. Must be string key-value pairs

Variant Options

ValueDescription
floating-action-cardA floating card anchored to the corner of the page
floating-action-buttonA compact floating button anchored to the corner of the page
floating-input-cardA floating input bar that can be moved to the corners of the page
embeddedEmbeds the widget inline within a host element