Marketo Youtube tracking : how to get likes, dislikes & number of views within Marketo ?

Mathias_Saint-1
Level 2

Marketo Youtube tracking : how to get likes, dislikes & number of views within Marketo ?

Hi Community,

First of all, I would like to say that we just implemented a way to track the interaction with our embedded Youtube videos using this method​ and it works like a charm !

But I am curious to know if there is a way to obtain the number of likes, dislikes and views attached to a video so that we can use those data within our smart campaigns (trigger when a video reaches a certain number of views for example,etc.).

Has anyone already tried to achieve this goal ?

Your coments and suggestions will be greatly appreciated !

Thanks a lot.

Mathias.

2 REPLIES 2
Erik_Heldebro2
Level 8

Re: Marketo Youtube tracking : how to get likes, dislikes & number of views within Marketo ?

Hey Mathias,

Maybe try to access the YouTube API, found example below here: https://developers.google.com/youtube/v3/getting-started

I'd see it as similar to the GA API access to Get/Post specific data via Webhooks between GA/Marketo.

Example:

URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
    
&part=snippet,contentDetails,statistics,status


Description: This example retrieves a video resource and identifies several
             resource parts that should be included in the API response
.

API response:


{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
 
{
  
"id": "7lCDEYXw3mM",
  
"kind": "youtube#video",
  
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
  
"snippet": {
   
"publishedAt": "2012-06-20T22:45:24.000Z",
   
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
   
"title": "Google I/O 101: Q&A On Using Google APIs",
   
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
   
"thumbnails": {
    
"default": {
     
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
    
},
    
"medium": {
     
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
    
},
    
"high": {
     
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
    
}
   
},
   
"categoryId": "28"
  
},
  
"contentDetails": {
   
"duration": "PT15M51S",
   
"aspectRatio": "RATIO_16_9"
  
},
  
"statistics": {
   
"viewCount": "3057",
   
"likeCount": "25",
   
"dislikeCount": "0",
   
"favoriteCount": "17",
   
"commentCount": "12"
  
},
  
"status": {
   
"uploadStatus": "STATUS_PROCESSED",
   
"privacyStatus": "PRIVACY_PUBLIC"
  
}
 
}
]
}

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Youtube tracking : how to get likes, dislikes & number of views within Marketo ?

The problem isn't gettng the statistics on a video, which is easy enough using the YouTube Data API​ and your language of choice.  The questions are What app is going to run that task? and Where is the data going to go?

Aside from needing a task runner (since Marketo itself won't poll for stats updates), remember that Marketo triggers run in the context of a single lead unless you make an API call that results in list-level/bulk-level activities.

So the question really is less how to obtain the data and more "what would you do if you had that data"? Imagine you had the stats in a spreadsheet right now as we speak... what would be your plan of attack for importing and actioning it in Marketo?