Support Types
LiftIgniter supports the following kinds of field values:
We do not currently accept nested JSON structures for `inventory items`. Any such nested structures will be ignored by us when scraping your inventory.
- String
- List of strings
- Number
1. Requesting additional Fields
You might want us to return additional information about the items for display in recommendations. For instance, you might want to display an author name, author image, or description field in your recommendation area.
In order to request extra fields, you need to send us the fields prior to fetching our recommendations with setRequestFields
from our JavaScript SDK:
$p("setRequestFields", ["list","of","fields","to","return"])
Sometimes we might have items that don’t contain all the fields you request. If you want us to only return items that contain all the fields you request, you can set this, again, prior to calling fetch with setRequestFieldAON
from the SDK.
$p("setRequestFieldsAON", true)
2. Setting fields explicitly
If you don’t see the fields you want, this is because the fields weren’t exposed on the page in a way we understand. You can include the fields in the LiftIgniter JSON object on the HTML of your pages:
<script id="liftigniter-metadata" type="application/json">
{
"genre" : ["comedy","horror","tragedy"],
"rating" : 20.1,
"author" : "anonymous"
}
</script>
3. Hiding Item
To exclude pages from being shown in recommendations, add the following in the head of those pages:
<script id="liftigniter-metadata" type="application/json">
{
...
"noShow" : "true",
...
}
</script>