By default, Single Purchases, Time Passes and Subscriptions are matched to articles by URL. In cases, where you need more flexibility, it is also possible to match by Article ID.
An Article ID can be specified instead of a URL, when you create a Single Purchase or Time Pass in Connector Admin Interface. The Article ID can then be referenced using In-Page Configuration to match these purchase items with an article.
- Multi-page articles, which spread over multiple paths, like “/example/page-1”, “/example/page-2” and “/example/page-3”
- Multi-language articles, where the same Single Purchase can be available under different paths like “/en/example” and “/de/example”
- Two different articles with the same base URL, but with different querystrings, like “/example?id=123” and “/example?id=456”
<meta property="laterpay:connector:article_id" content="my_custom_article_id">
This sets the Article ID to “my_custom_article_id”.
Multiple Article IDs¶
It is possible to specify multiple Article IDs on the same page. This feature can be used to create overlapping Single Purchases, Time Passes and/or Subscriptions.
When multiple Article IDs are specified, the following purchase items are offered to the user:
- One matching Single Purchase (if multiple matching Single Purchases exist: the last modified one)
- All matching Time Passes and Subscriptions
If a user has purchased at least one of the matching Single Purchases, Time Passes or Subscriptions they will be granted access to the article.
Assuming, an article should belong to both a “Sports Bundle” and a “News Bundle” and Time Passes for the Article IDs “sports_bundle” and “news_bundle” have been created in Connector Admin Interface, the following code would associate the article page with both Time Passes:
<meta property="laterpay:connector:article_id" content="sports_bundle"> <meta property="laterpay:connector:article_id" content="news_bundle">