Video Heartbeat v1.5 Implementation 4: Custom variables

Video Heartbeat v1.5 Implementation Posts:

In this post, I would like to explain how to implement custom variables in video heartbeat v1.5. In order to add custom variables, you need to use context data and processing rules. Supporting the custom variables is the new feature in v1.5 as I wrote in Now is the time to migrate to Video Heartbeat.

Adobe Video heartbeat SDK includes the sample video player. I will use this 1 minute video to explain how to implement context data, set the processing rules and check video heartbeat reports. The video contains the imaginary chapters and ad during the playback.

adobedemo
Adobe SDK’s sample video (length = 1:00):

  • 0:00 – 0:15 (15 seconds) = Chapter 1
  • 0:15 – 0:30 (15 seconds) = Ad 1
  • 0:30 – 1:00 (30 seconds) = Chapter 2.

 

Implement context data

You can add context data for video, chapter or ad reports. For example, you would like to track the name of the production for the video. In this case, you add context data named “production” to video report. If you need to know each chapter’s description, you add “description” context data to chapter report. You may also need to know the ad’s company name, then “company” context data can be added to ad report. In order to add these context data, you need to implement them through adobe analytics plugin methods:

  • setVideoMetadata() – context data for video report
  • setChapterMetadata() – context data for chapter report
  • setAdMetadata() – context data for ad report

These methods should be called before trackVideoLoad(), trackChapterStart() or trackAdStart().  In other words, context data is added to video start, chapter start or ad start. You can’t add context data to other events such as chaapter complete, video pause or video seek start.

Let’s implement the following context data for each report:

  • Video report – “production”, production name
  • Chapter report – “description”, chapter’s description
  • Ad report – “company” and “campaign”, ad’s company name and its campaign code

 

Set processing  rules

Context metadata works with processing rules. Data is not going to be stored if processing rules are not set to capture the context data. In my report suite, I enabled eVar 71 – 74 to track the context data for the video heartbeat reports.

  • eVar 71 – production
  • eVar 72 – description
  • eVar 73 – company
  • eVar 74 – campaign

Then, I set the processing rules for each context data like eVar 72 below.evar72_processing_rules

Check video heartbeat reports

If you successfully implemented the context data and set the processing rules, you will see the data in the video, chapter and ad reports. “clickbaby” is the video ID for the sample video.

Video report – Video ID by production
The production name, Toronto media prodcuction inc was tracked in eVar71.
evar71_video

Chapter report – Video ID by description
The chapter descriptions for chapter 1 and chapter 2 were tracked in eVar72.
evar72_chapter
You might wonder why the chapter time spent was slightly different. We set chapter 1 = 15 seconds and chapter 2 = 30 seconds. Therefore, we expect that the total time of chapter time spent should be 45 seconds. Since video heartbeat sends heartbeat server call every 10 seconds to increment the playback time, the time spent mettrics, e.g. video time viewed, chapter time spent and ad time spent, might have few seconds difference from the actual time play.

Ad report – Video ID by campaign
The ad campaign name “abcbank_ad2015summer” was tracked in eVar74.
evar74_ads

Ad’s company by campaign
You can also breakdown company by campaign, both eVars are for the ad’s context data.evar73_by_74

Context data with other metrics

We have looked video metrics with the video context data, chapter metrics with the chapter context data, ad metrics with the ad context adata. How about the relationship between each custom metadata and other metrics? How “production” works with ad start? How  “campaign” works with chapter complete? Let’s add all metrics to video ID and break down by each context data. Please click the images to enlarge.

Video Report – Video ID by production
evar71_full
“Toronto media production inc” has the data for all metrics. From this report, we can tell that the clickbaby video by Toronto media production inc:

  • was played, completed once with the total time of 45 seconds.
  • had two chapters in the video playback. Both two chapters were played, completed with the total time of 38 seconds.
  • had one ad during the video playback. The ad was played, completed with the total time of 14 seconds.

Chapter report – Video ID by description
evar72_full
Chapter context data has the data with chapter metrics only. You see “None” for video metrics and ad metrics. From this report, we can tell that the clickbaby’s:

  • “chapter 1: Opening Ceremony and national anthem” was played, completed once with the total time of 13 seconds.
  • “chapter 2: The Opening Ceremony Speech” was played, completed once with the total time of 25 seconds.

Although “chapter 1: Opening ….” was started at 0:00 when the video was also started, “Video Views” metrics doesn’t count for the description. This is because trackVideoLoad() happens before trackChapterStart() for the chapter 1. Video heartbeat treats video report and chapter report in the different stream lines.

Ad report – Video ID by campaign
evar74_full
“abcbank_ad2015summer”, ad context data has the data with all metrics except “Video Views”. From this report, the campaign’s video was played in the main video playback that had two chapters. Both two chapters were played, completed with the total time of 38 seconds. Also, you see that the main video was completed with the total time of 45 seconds; however, you can’t tell how many times the main video was started for this campaign video.

You might wonder why the ad context data has the data for chapter metrics and some video metrics, but chapter context data doesn’t. This is because trackAdStart() for the ad context data is sent to analytic server. trackChapterStart() for the chapter context data is sent to heartbeat server.

Summary:

  • Context data and processing rules are required to implement custom variables.
  • Context data can be added to video start, chapter start or ad start.
  • Data is not tracked if processing rules are not set for the context data.
  • Video context data is in all video heartbeat metrics.
  • Chapter context data is in chapter metrics only.
  • Ad context data is not in video start metrics.

 

Leave a Reply

Your email address will not be published. Required fields are marked *