<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 for Video (Part 4)

Welcome to Part 4 of the LaterPay Video 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/G62VoQaDc1M

 

 

In a nutshell: we are going to mark which videos 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 videos 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.  Associating a video with an articleID happens in the laterpayConnector section of the video. Since we are using JWPlayer in this guide, we will illustrate it on a typical JWPlayer code example

<script type="text/javascript">

           jwplayer('video-container').setup({

               width: '1020',

               height: '700',

               file: 'https://laterpayvideo.wpengine.com/wp-content/uploads/2018/08/surfer.mp4',

               laterpayConnector: {

                   articleId: 'Single_Purchase_Video',

                   video: {

                       mode: 'sell-video'

                   }

               }

           })

</script>


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

 

Connector Video 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 that will apply to that video only. For the purposes of our example, we named the ArticleID “Single_Purchase_Video” - afterwards, we will add a new one “Sports_Subscription.” 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 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 the case above that is “SinglePurchase.” Finally, we can define the price as 50 cents, pay later.

 

Connector Video 5-2

Figure 5.2: Adding the ArticleID

 

Connector Video 5-3

Figure 5.3: The Updated Overlay

 

As you will have seen in the video, this results in a single purchase defined on the sample video. The question is, why did we take the ArticleID route at all? Why don’t we always define a number of videos 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 videos, 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 lecture, taking a video from the “Sports” category and assigning the same ArticleID to it will lead to the defined individual purchase option being applied to that video as well. It’s as simple as that! It may not make much of a difference if you only have a few videos to work with, but imagine if you have tens, or even hundreds, of videos 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 time passes. All you need to do is to add a purchasing option and then reference the videos via the ArticleID. In addition, each video can have multiple IDs, you just need to add them in an array, like this:

 

<script type="text/javascript">

           jwplayer('video-container').setup({

               width: '1020',

               height: '700',

               file: 'https://laterpayvideo.wpengine.com/wp-content/uploads/2018/08/surfer.mp4',

               laterpayConnector: {

                   articleId: ['Single_Purchase_Video',Sports_Subscription],

                   video: {

                       mode: 'sell-video'

                   }

               }

           })

</script>

 

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

 

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

 

Checklist: Using In-Page Configuration/Article ID

  • Modify the code of the video player to include the ArticleID
  • Create a purchasing option, referencing the ArticleID in the text box
  • (Optionally you can assign additional ArticleIDs  to a video by creating an array of IDs 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 Videos Together: A user can buy a number of videos as a single purchase (using ArticleID)

Prerequisite: Level 5

Objective: Three videos 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/O1DyYNrrkL0

 

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

 

To get started, you first need to add the ArticleID to each video, by inserting the articleID property in the LaterPay Connector section of your video player.

 

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 Videos Separately (Using ArticleID)

Prerequisite: Level 5

Objective: Three videos will be sold separately via ArticleID

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

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

 

We first need to add a separate ArticleID to videos in the source code. Do not forget to insert the ArticleID property in the LaterPay Connector section of your video player.

 

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 video, and reference the ArticleID for that video. Then repeat these steps for all the videos you intend to sell individually, creating a purchase overlay for all of them, but with individual pricing.

 

 

Scenario 5.3: Defining a monthly subscription for a particular video type by using ArticleIDs

Prerequisite: Level 5

Objective: Create a monthly subscription for two videos in two different categories using the ArticleID property

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

 

In this scenario, we are going to define two subscriptions for videos spanning two different categories: sports and the economy. The same video 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 videos, associating them with the ArticleID to be used.

 

After that is completed, we need to create a monthly 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 for video script and the video player script (In our case JW Player).

 

 

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

Prerequisite: Level 5

Objective: Create a 2 hour and a 1-day Time Pass for two videos, using the ArticleID property

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

 

In this scenario, we are going to define two Time Passes for videos spanning two different categories. The same video 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 videos, associating them with the ArticleID to be used.

 

After that is completed, we need to create a two time passes, specifying a title and a description. Then, we select “Article ID” as the Match Type option, inserting the ArticleID in the text box. To conclude we select the price.

 

Finally, do not forget to make sure the pages you want to apply your subscription paywall on are all loading the connector for video script and the video player script (In our case JW Player).

 

 

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

Prerequisite: Level 5

Objective: Create a subscription for multiple videos, and a single purchase on one video using ArticleID

Video Tutorial: https://youtu.be/9dhiefFuHek

 

In this video, we are going to define a subscription for two videos, and then proceed to define a single purchase for one video, using ArticleID. This is important when introducing multiple ArticleIDs for a single video.

 

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

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

 

              laterpayConnector: {

  articleId: ['Subscription','SinglePurchase'],

                   video: {

                       mode: 'sell-video'

                   }

               }

 

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 video only

 

Finally, do not forget to make sure the pages you want to apply your subscription paywall on are all loading the connector for video script and the video player script (In our case JW Player).