Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Origin Parameter Support for YouTube Tracking #61

Closed
wants to merge 1 commit into from

3 participants

@thyngster

No description provided.

@tomfuertes
Collaborator

Merged into develop: cda1405

@tomfuertes tomfuertes closed this
@tomfuertes
Collaborator

Thanks!

@thyngster

tom, eduardo i forgot to add the same parameters to _ytMigrateObjectEmbed function

@tomfuertes tomfuertes reopened this
@tomfuertes tomfuertes closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 11, 2013
  1. @thyngster
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/plugins/youtube.js
View
4 src/plugins/youtube.js
@@ -165,9 +165,9 @@ function _trackYoutube(opts) {
if (force) {
// Reload the video enabling the api
if (sindexOf.call(iframes[i].src, '?') < 0) {
- iframes[i].src += '?enablejsapi=1';
+ iframes[i].src += '?enablejsapi=1&origin='+encodeURIComponent(location.protocol+'//'+location.hostname);
} else {
- iframes[i].src += '&enablejsapi=1';
+ iframes[i].src += '&enablejsapi=1&origin='+encodeURIComponent(location.protocol+'//'+location.hostname);
}
} else {
// We can't track players that don't have api enabled.
Something went wrong with that request. Please try again.