LongTail Video is now JW Player - New Name, Same Passion For Video

Close

CATEGORY:

/

GAPro Confusion

5 replies [Last post]

Hello, I've got my JWPlayer setup but I'm having a hard time understanding the string passed to Google. I want to pass the "title" of the video to Google Analytics so I've added the following sting to my javascript:

"idstring": "||mediaid||-||title||"

The resulting title in google includes the pipes (||) which didn't seem right. Also, do I have to replace "title" with the title of the video and if so, is 'mediaid' required?

I looked through the documentation and for some reason I can't get my head around this. I think I'm over thinking this. Any help is appreciated.

Thanks,

Bill

Bueller, Bueller.....

You'll need to include the title attribute in your configuration. This would look something like:

jwplayer().setup({
  file: "bunny.mp4",
  mediaid: "23940jf09ejw0mr02",
  title: "Bunny's first appearance",

  plugins: {
    "gapro-2": {
      idstring: "||mediaid||-||title||"
    }
  }
});

This would result in "23940jf09ejw0mr02 - Bunny's first appearance" showing up in your GA reports.

Thanks Zach, I tried that so I'll see what shows up in GA. Nowhere in the GAPro documentation do they say you need to add the additional 'title' variable. Even their example is the following which omits that variable except in the 'idstring' line:

<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>

<div id="mediaplayer"></div>

<script type="text/javascript">
  jwplayer("mediaplayer").setup({
    "flashplayer": "player.swf",
    "width": "480",
    "height": "270",
    "file": "/videos/bunny.mp4",
    "image": "/thumbs/bunny.jpg",
    "plugins": {
      "gapro-2": {
        "idstring": "||mediaid||-||title||"
      }
    }
  });
</script>

Thanks again, I'll report back.

Works now, thanks Zach. Just wondering why none of the examples show adding the 'title' variable as a separate line in the JS.

Sorry - not quite sure what you mean by this…

Still don't have the new JW Player? Get It Here