/
TireConnect Widgets Deployment Guide

TireConnect Widgets Deployment Guide

 

This guide will walk you through the process of deploying TireConnect turnkey widgets to your website. Deploying our widgets is a straightforward process that should be familiar to webmasters and/or website developers. This method of embedding is the current standard and only means supported for this process. We also recommend you read our TireConnect Embedding & Website Best Practices document.

TireConnect provides different types of turnkey widgets.

*Note: widget API key provided can be used for all types of widget and can be used simultaneously with other types as well.

  1. Standard Search Widget - ( Demo ) - This is our standard search widget. It allows users to search for tires by their vehicle make or alternatively by a specific tire size.

  2. Locator Search Widget - ( Demo ) - This widget is ideal if you have multiple locations and want a quick and simple way for customers visiting your website to find their preferred location.

  3. Mobile Installer Widget ( Demo ) - This widget works like Location Search Widget, but all user needs to do it’s to enter location and widget will automatically pick up the nearest location. Please refer to Locator Search Widget with mode: “auto” param installed.

  4. Compact Search Widget - ( Demo ) - This widget is designed to scale down to a compact size so that it can be easily installed in a sidebar or other confined space on your website. It provides the same search functionality as the Standard Search Widget.

  5. Offers Widget - ( Demo )  - TireConnect Offers is a widget that provides a concise real-time catalog of all available tire discounts and rebates.

  6. Automotive Services Widget - ( Demo ) - This is our widget that will help you to provide Automotive Services for customers.

  7. Wheels & Packages Widget - ( Demo ) - This is our standard wheels search widget. It allows users to search for wheels by their vehicle. This widget combines standard search widget and location search widget dependent from embed parameters.

All types of turnkey widgets follow the same basic method of embedding with only minor variations between each. You can copy and paste the examples below directly into your webpage and then make a few minor edits to the source code to personalize your embedded turnkey widget to your needs.

 

Parameters Legend

Each widget type requires a certain number of parameters to be set in the embed code. The  colour legend below shows the different types of parameters you will encounter for each widget type.

MANDATORY

Parameters highlighted in red are mandatory. If you copy and paste the examples below, then you must change the mandatory parameters accordingly.

OPTIONAL

Parameters highlighted in green are optional. In most cases you can leave the parameter alone when you copy and paste the code samples. Read the specific directions for each below.

If you copy the instructions below, all you will need to do in each case will be to substitute the API key we emailed to you after your TireConnect training was complete.

Table of Contents

Standard Search Widget 

( Demo )

<script src="https://app.tireconnect.ca/js/widget.js"></script> <div id="tireconnect"></div> <script> TCWidget.init({ apikey: 'SUBSTITUTE_YOUR_API_KEY_HERE', container: 'tireconnect' }); </script>

Be careful when you paste your own API key into the highlighted spot not to delete either of the quotes. They are important and the embed function will not work properly without both of them. There is no need to change the container value of ‘tireconnect’, however if you do change it, be sure to also change it in the DIV a few lines above. Again, keep the quotes.

Parameters

apikey:

Insert the api_key we emailed to you here.

container:

This value must match the name of the DIV directly above the <script> tag. If you change the name of the DIV, you must update this value to match. Your best option is to simply copy and paste this value into your webpage.

locationId:
(optional parameter)

This parameter enables you to optionally pre-select a location, if you are a multi location business. 
Location ID can be emailed to you if you would like to use this functionality. 

Demo

locale:
(optional parameter)

This parameter enables you to optionally select a locale for this widget. Please note the locale has to be available for this account. 

Please also note, there is a default value set based on account settings. Examples: en_US, en_CA, fr_CA

Demo

locationLock:
(optional parameter)

Allow to hide standard TC location selector in the top of widget on search page. Accepted values: truefalse

This param working only with locationID param in embed code.

Demo

servicesWidgetUrl:
(optional parameter)

This optional parameter tells the Search Widget where to re-direct the consumer to in order to display automotive services widget. Used for Automotive Services Widget and Standard Search Widget relation.

Demo

 

Standard Search Widget that allow to change location ID without initializing it 

( Demo )

Be careful when you paste your own API key into the highlighted spot not to delete either of the quotes. They are important and the embed function will not work properly without both of them. There is no need to change the container value of ‘tireconnect’, however if you do change it, be sure to also change it in the DIV a few lines above. Again, keep the quotes.

<script src="https://app.tireconnect.ca/js/widget.js"></script> <div id="tireconnect"></div> <script> function changeLocation(locationId) { searchWidget.changeLocation(locationId); } TCWidget.init({ apikey: 'SUBSTITUTE_YOUR_API_KEY_HERE', container: 'tireconnect', locationLock: true, }).then(function(widget) { searchWidget = widget; }); </script>

Parameters

apikey:

Insert the api_key we emailed to you here.

container:

This value must match the name of the DIV directly above the <script> tag. If you change the name of the DIV, you must update this value to match. Your best option is to simply copy and paste this value into your webpage.

locationId:
(optional parameter)

This parameter enables you to optionally pre-select a location, if you are a multi location business. 
Location ID can be emailed to you if you would like to use this functionality. 

locale:
(optional parameter)

This parameter enables you to optionally select a locale for this widget. Please note the locale has to be available for this account. 

Please also note, there is a default value set based on account settings. Examples: en_US, en_CA, fr_CA

locationLock:
(optional parameter)

Allow to hide standard TC location selector in the top of widget on search page. Accepted values: truefalse

This param working only with locationID param in embed code.

changelocation

Method of widget instance, that allow you to change location externally. It receive only location id.

How to get access to widget instance:

  1. TCWidget.init() returns a promise.

  2. Each promise has method `then`

  3. method `then` receive function parameter

  4. this function recaive only one parameter. This parameter is owr widget instance.

For better understanding please see example.

Locator Search Widget 

( Demo )

The locator search widget is typically used by clients with multiple dealer locations. The Locator Search Widget is often placed on their homepage. Using this widget, consumers can find your closest or most appropriate location for themselves before conducting a tire search.

<script src="https://app.tireconnect.ca/js/widget.js"></script> <div id="tireconnect"></div> <script> TCWidget.initLocator({ apikey: 'SUBSTITUTE_YOUR_API_KEY_HERE', container: 'tireconnect' }); </