<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=442498563201411&amp;ev=PageView&amp;noscript=1">

Getting Started with the LaterPay Connector (Part 4)

Welcome to Part 4 the LaterPay Connector Guide!

 

In Part 3, we covered how to add time passes and subscriptions using the LaterPay Connector. If you need a refresher before you move forward, you can access the earlier Levels below:

Now it's time to learn about in-page configuration and ArticleIDs!

 


LEVEL 5: Using In-Page Configuration and ArticleIDs

In the previous Levels, you will have seen the term ‘In-Page Configuration’ mentioned a couple of times. In this section, we will discuss what that is and will demonstrate how it can be used in its simplest form. First, check out our latest video tutorial to see this in action: https://youtu.be/oHEHuWMpVxk

 

 

In a nutshell: we are going to mark which articles to apply purchasing options to using the ArticleID, rather than the direct URL. If you are comfortable working with code, this is a useful tactic for when you have a large - or growing - number of articles to which you want to apply the same purchasing option.

 

So, what does in-page configuration look like? It requires you to modify the code of your website, much like we did when we needed to add the Connector script to the webpage.  Since we are only associating an article with an ArticleID, we just need to add the following snippet to the article page code:

<script type="application/json" id="laterpay-connector">

           {

               "articleId": "SinglePurchase"

           }

</script>


Note: This code needs to be added to the <head> section of the code and put in before the Connector script.

5-1

Figure 5.1: Inserting the Code Snippet Above the Connector Script 

 

This is a notation which enables us to define some in-page configurations which will apply to that website only. For the purposes of our example, we named the ArticleID “SinglePurchase” - and alter we add a new one “SportsSubscription” - but you can create names of your own, just be sure to change the source code and use that ArticleID when creating the new subscription or Time Pass.

 

We can now create a purchasing option and link it to this articleID. First, go back to the Connector dashboard and create a new single purchase to bring up the new purchase dialog window. The same rules will apply as before - we will just be changing the referencing logic. So, select ArticleID and input the name of the ArticleID defined in the snippet - in our case above that is “SinglePurchase”. Finally, we can define the price as 50 cents, pay later.

5-2

Figure 5.2: Adding the ArticleID

 

As you saw in the video, this results in a single purchase defined on the sample website. The question is, why did we take the ArticleID route at all? Why don’t we always define a number of articles you want to sell by individually listing them on a configuration interface?

 

You can, of course, take that approach - it is entirely up to you.  As a general rule, if you feel comfortable with editing code, and you have a larger or a growing number of articles, you might want to take the ArticleID route, but ultimately you can choose whichever method is more convenient for you.


Let’s take a look at an example. As you saw in the video, taking an article from the “Sports” category and assigning the same ArticleID to it will lead to the defined individual purchase option being applied to it as well. It’s as simple as that! It may not make much of a difference if you only have a few articles to work with, but imagine if you have tens, or even hundreds, of article to which you want to apply the same purchasing option - this should give you an idea of which configuration route is most appropriate for your content.

 

It’s important to remember that you can use this approach for all the purchasing options - even for subscriptions and timepasses. All you need to do is to add a purchasing option and then reference the articles via the ArticleID. In addition, each article can have multiple IDs, you just need to add them in an array, like this:

 

<script type="application/json" id="laterpay-connector">

           {

               "articleId": ["SinglePurchase", "SportsSubscription"]

           }

</script>

 

Then, by adding this new ID to our sports article, and referencing it in the newly created subscription (Sports Subscription, for 2,50 EUR), we are able to define this subscription only for the sports article!

 

You’re are all done! Congratulations on successfully completing Level 5!

 

Checklist: Using In-Page Configuration/Article ID

  • Modify the code of the website to include the ArticleID
  • Create a purchasing option, referencing the ArticleID in the text box
  • (Optionally you can assign additional ArticleIDs by creating additional instances in the ArticleID section of the in-page configuration menu)
  • Refresh content and confirm that you're all set!

ADDITIONAL SCENARIOS

Scenario 5.1: Bundling Articles Together: A user can buy a number of articles as a single purchase (using ArticleID)

Prerequisite: Level 5

Objective: Three articles will be sold as a bundle, meaning that the users can buy all three of them in a single purchase

Video Tutorial: https://youtu.be/nII56zJe-cg

 

In this scenario, we will bundle articles together and sell them via ArticleID In-Page property.

 

To get started, you first need to add the ArticleID to each article, by inserting the In-Page connector configuration before the connector script.

 

Once that is done, we proceed to creating a single purchasing option that references that ArticleID. To do this, click on New Single Purchase, type in a title, and select Article ID from Match Type options.

 

Add the ArticleID to the text box, specify the price and payment type, link to template, and your paywall will be created!

 

 

Scenario 5.2: Selling Articles Separately (Using ArticleID)

Prerequisite: Level 5

Objective: Three articles will be sold separately via ArticleID

Video Tutorial: https://youtu.be/h3UewXqW0Zw

 

In this scenario, we will be selling articles separately by associating individual single purchases with ArticleIDs defined uniquely for each article.

 

We first need to add a separate ArticleID to article in the source code. Do not forget to insert the ArticleIDs via in-page configuration before the connector script.

 

Once that is done, you need to reference the ArticleIDs from the individual single purchasing options. First, create a single purchasing option for the first article, and reference the ArticleID for that article. Then repeat these steps for all the articles you intend to sell individually, creating a purchase overlay for all of them, but with individual pricing.

 

Scenario 5.3: Defining a yearly and a monthly subscription for a particular article type by using ArticleIDs

Prerequisite: Level 5

Objective: Create a yearly and a monthly subscription for four articles in two different categories using the ArticleID property

Video Tutorial: https://youtu.be/N-fantCJgaY

 

In this scenario, we are going to define two subscriptions for articles spanning two different categories: sports and the economy. The same article types will need to be linked with the same ArticleID, which will be referenced from the defined subscriptions. As a result, we need to add the In-Page configuration to the targeted articles, associating them with the ArticleID to be used.

 

After that is completed, we need to create a monthly and a yearly subscription, specifying a title and a description. Then, we select “Article ID” as the Match Type option, inserting the ArticleID into the text box. To conclude, we select the price and link the purchasing option to the template.

 

Finally, do not forget to make sure the pages you want to apply your subscription paywall on are all loading the connector script underneath the In-Page configuration.

 

 

 

Scenario 5.4: Defining a 2 hour and a day Time Pass for a particular article type by using ArticleIDs

Prerequisite: Level 5

Objective: Create a 2 hour and a 1-day Time Pass for 3 articles, all of which are in the same category, using the ArticleID property

Video Tutorial: https://youtu.be/v7hPWe1GoPk

 

In this scenario, we are going to define two Time Passes for articles spanning two different categories: sports and the economy. The same article types will need to be linked with the same ArticleID, which will be referenced from the defined Time Passes. As a result, we need to add the In-Page configuration to the targeted articles, associating them with the ArticleID to be used.

 

After that is completed, we need to create a 2 hour and a 1-day time pass, specifying a title and a description. Then, we select “Article ID” as the Match Type option, inserting the ArticleID into the text box. To conclude, we select the price and link the purchasing option to the template.

 

Finally, do not forget to make sure the pages you want to apply your subscription paywall on are all loading the connector script underneath the In-Page configuration.

 

 

Scenario 5.5: Combining the Purchasing Options: Defining a single purchase and a subscription

Prerequisite: Level 5

Objective: Create a subscription for multiple articles, and a single purchase on one article using ArticleID

Video Tutorial: https://youtu.be/N98qrXa4NA8

 

In this scenario, we are going to define a subscription for articles of the same category, and then proceed to define a single purchase for one article, by using ArticleID. This is important when introducing multiple ArticleIDs for a single article.

 

We firstly need to define an ArticleID for the Subscription - let us call it “Subscription”. After all the articles have this ID associated with them, we need to create a subscription offering for this ArticleID, resulting in subscriptions being visible for these articles.

Now, we need to add an additional ArticleID to one of the articles that we’ve chosen to sell separately. Let’s add the “SinglePurchase” ArticleID to the selection of ArticleIDs belonging to that respective article.

 

<script type="application/json" id="laterpay-connector">

           {

               "articleId": ["SinglePurchase","Subscription"]

           }

</script>

 

Finally, by defining a new single purchase option with that ArticleID, you will see that it is added to the purchase options list for that article only.