Name |
Mandatory/Optional |
Type |
Description |
svKey |
Mandatory |
String |
SV key as declared in the SV schema within the AdKit configuration file |
Invokes the click-through URLs specified for this catalog version/product. Used to trigger a click-through and associate it with a specific catalog product/version.
adkit.onReady(function() { document.getElementById("product1").addEventListener('click', function() { adkit.clickedVersion(1, "http://host/path"); }); });
Returns the requested catalog versions/products either as an argument of the callback function or null if the catalog versions/products cannot be acquired.
If the endIndex is not specified, it will be equal to the catalog versions/products count.
adkit.onReady(function() { adkit.getVersions(1, 5, function(versions if (versions) { for (var i = versions.startVersionNum; i <= versions.endVersionNum; i++) { var version = versions.versionData[i]; var value = version["logo"].value; } } }); });
Name |
Mandatory/Optional |
Type |
Description |
startindex |
Mandatory |
Integer |
Index of the first catalog version/product to acquire. |
endIndex |
Optional |
Integer |
Index of the last catalog version/product to acquire. If not specified, catalog versions/products count will be used. |
readyCB |
Mandatory |
Function |
Executed when all the requested catalog versions/products are ready. |
Name |
Mandatory/Optional |
Type |
Description |
versionsInfo |
Mandatory |
Object |
Information for requested catalog versions/products. |
Name |
Mandatory/Optional |
Type |
Description |
startVersionNum |
Mandatory |
Integer |
Index according to the first catalog version/product. |
endVersionNum |
Mandatory |
Integer |
Index according to the last catalog version/product |
versionData |
Mandatory |
Object |
This object holds all retrieved catalog versions/products. You can access a catalog version/product object using the version index. For example: versionInfo.versionData[versionInfo.startVersionNum] |
The version/product object contains smart items objects.
The smart items objects can be accessed using the smart item key that was declared in the SVCatalog schema in the AdKit configuration file.
Returns the smart item object for catalog version/product index and smart item key combination (null if not defined) as an argument of the callback function.
This is used to retrieve specific smart item data from a specific catalog version/product, rather than the entire catalog version/product.
adkit.onReady(function() { adkit.getVersionDataByKey(1, "logo", function(smartItem) { if (smartItem) { var value = smartItem.value; } }); });
Name |
Mandatory/Optional |
Type |
Description |
versionIndex |
Mandatory |
Integer |
Index of the requested version/product. |
key |
Mandatory |
String |
A key for the requested smart item. |
readyCB |
Mandatory |
Function |
This function runs when the smart item is ready. |
Name |
Mandatory/Optional |
Type |
Description |
smartItem |
Mandatory |
Object |
Smart item object (can be null). |
Comments