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. Location 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 Search 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 (standard search widget)

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>

 

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' }); </script>

Parameters (locator search widget)

apikey:

Insert the api_key we emailed to you here.

container:

This value must match the id 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

centerCoords:
(optional parameter)

Initial center coordinates when map opens.

Example: [34.0522342, -118.2436849]

Demo

locationList:
(optional parameter)

true - location list will be present always

false - will hide location list when widget loads first time in case there is no centerCords in embed code and address passed in link.

Location list will appear after customer enter his address.

Demo

mode
(optional parameter)

manual - locator widget will work as usual (default value, if you don’t want to use it just ignore this param)

auto (Demo) - User would be asked to enter their zip code or address, the locator would selected the closest location and displayed the appropriate widget.

  • Name of the selected location won’t be displayed.

  • If users clicks Change location, we would go through the same process again.

 

Compact Search Widget ( Demo )

 

Parameters (compact search widget)

apikey:

Insert the api_key we emailed to you here

container:

This value must match the id 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.

layout:

In case you’re not using this parameter compact search widget will be automatically adjusted according to page or div size and layout will be changed. EG In case parent div will be more that 768px - widget will use horizontal layout. In case less that 768px - vertical.
But you can set compact search widget to use one on views manually using such parameters:
vertical for the standard widget or horizontal for the slim horizontal widget

Demo

locationDetect:
(optional parameter)

auto - When set to 'auto', this parameter causes the compact widget to display the location selector as a text input field. This is the default value when the parameter is not passed.

manual - Causes the compact widget to display a select menu of all locations associated with your client account.

Demo

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. 

Note: This parameter is only applicable if the locationDetect is set to manual. 

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

view:
(optional parameter)

full - Adds 3 extra search fields to the compact widget on the Tire Size tab (default if not set directly)

compact - Extra fields are not added. Note: This parameter will be ignored if the layout parameter is set to horizontal.

Demo

redirectUrl:
(optional parameter)

This optional parameter tells the Compact Search Widget where to re-direct the consumer to in order to display their search results. The compact widget only initiates searches. It does NOT display search results itself, but rather redirects the consumer to an instance of the Standard Search Widget that must be installed on the client's website.

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

locationAutoSelect:
(optional parameter)

In case Compact Search Widget redirect to page with Locator we could set up if nearest location will be selected automatically or not.

true - nearest location will be selected automatically. (Default value)

false - nearest location won't be selected manually and user should select it manually

Demo

 

TireConnect Offers ( Demo )

TireConnect Offers is a widget provides a concise real-time catalog of all available tire discounts and rebates. TireConnect Offers is directly connected to the main TireConnect widget, where customers can complete their purchase of these featured tires.

Visit our administrator manual offers section to learn how to create offers through the TireConnect platform, and select which offers are to be displayed in the Standalone TireConnect Offers Widget.

 

Parameters (offers widget)

apikey:

Insert the api_key we emailed to you here.

container:

This value must match the id 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.

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

redirectUrl:
(optional parameter)

This optional parameter tells the Offer Widget where to re-direct the consumer to in order to display their search results.

Demo

NOTE: In TireConnect Offers widget we're using Compact Search Widget so you can use all Parameters for installing TireConnect Offers.

 

TireConnect Automotive Services Widget ( Demo )

 

Parameters (Automotive Services Widget)

apikey:

Insert the api_key we emailed to you here.

container:

This value must match the id 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

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

locationSelector:
(optional parameter)

The option controls how the location selection will be displayed to the user

auto (default) - When set to 'auto', it detects automatically, which type of selector to choose, based on the location count of the specified account.

dropdown - Simple dropdown with all locations associated with your client account will be shown to the user.

locator - Enhanced locations selector with map and search functionality, allows user to find their closest or most appropriate location.

Demo

lock - Location selector is not displayed to the customer in this case. locationId parameter is required for proper location selection

Demo

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

redirectUrl:
(optional parameter)

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

Demo

locationList:
(optional parameter)

true - location list will be present always

false - will hide location list when widget loads first time in case there is no centerCords in embed code and address passed in link.

Location list will appear after customer enter his address.

*Note: work only with locationSelector: locator or with auto or without this param when there is 3+ locations.

Demo

mode
(optional parameter)

manual - locator widget will work as usual (default value)

auto - User would be asked to enter their zip code or address, the locator would selected the closest location and displayed the appropriate widget.

  • Name of the selected location won’t be displayed.

  • If users clicks Change location, we would go though the same process again.

Demo

 

TireConnect Wheels Solution ( Demo )

 

Parameters (Standard Wheels Search Widget)

apikey:

Insert the api_key we emailed to you here.

container:

This value must match the id 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

locator:
(optional parameter)

This parameter allow you to enable location search widget type instead of standard type when embedding wheels search widget.

true - location search widget will be enabled

false - standard search widget will be enabled.

Note: In case parameter is missing it’s set to false by default so standard search widget will be enabled.

Demo

package:
(optional parameter)

This parameter allow you to hide "Need tires?" option from summary page

true - You will see "Need tires?" in case there is at least one active tire supplier.

false - option "Need tires?" will be hidden.

Note: In case parameter is missing it’s set to true.

Demo