What is a widget instance and what does it do?
Our widget codes are designed to load a widget you have created with additional settings. For example, you would create a widget instance for your homepage and a separate widget instance for your product or location page.
A benefit of using an instance is that you never will have to swap out the code in scenarios where the parameters change (e.g., changing the widget style associated with the widget instance, or changing the photo sorting options).
Widget Management options
Widget instances are created along with different settings. The following parameters are saved into a widget instance:
Name - Name of the widget instance
Style - Selection of widget style created in the Widget Design tab
Source - Specify how the photos should be shown
Sorting preferences
Advanced Settings
Naming Conventions
How you name your Instance is very important. The Instance name is how you filter analytics later. A good strategy for naming your instance is:
State: is extra information for [DEMO] and [TEST] everything else is just live
PageName: This is the type of page the widget will be on: homepage, category, product page, blog, etc…
Type of Widget: Carousel, Wall, API
Location on the Page: Above the fold, below the fold, upper right hand side.
Feel free to append anything to the end like hashtag or campaign information. The name is there to help you remember what the widget is later on!
Once the script tag is implemented, it will pull in the Olapic build file and bind the following data attributes:
Widget Instance ID (45 char unique hash associated with saved instance)
Account API key
With the following 2 params given by the script tag, our server will then return appropriate widget functionality & data.
Creating a new widget instance
BEFORE PROCEEDING- Make sure that you have created the widget of your choice in the Appearance section first.
Go to the Widgets tab and click Create new instance.
Type in the Name, choose the widget style and mode.Note: Under Advanced settings, you will see a development mode checkbox. When enabled, this option requires olapicForceRender as an URL parameter in order to render the widget. Additionally, the instance will use sandbox assets (bypasses cache).
Once the instance is saved, grab the code from the bottom of the page.