As Google Tag Manager released the new update for built in variables for Youtube, I followed this tutorial of Simo Ahava for Youtube tracking: https://www.simoahava.com/analytics/the-youtube-video-trigger-in-google-tag-manager/
However, when I test my website in Preview mode, there is no gtm.video data layer. Because of that, there is no tag firing.
Any help will be appreciated, and if you believe my website has this video embedded code hidden, here is my page with video: https://www.magestore.com/magento-store-manager
Thank you!
Edited: Even if there is no gtm.video in Preview Mode, the tag actually still fires. You can check it in Real time mode of GA or wait until GA collects enough data.
We are having an issue with this functionality as well. We followed Simo's blog to implement and as of yesterday the functionality has become very unstable. We maybe have the tag firing 1 out of 20 page loads. We have tried loading the iframe_api as the first script. We have changed the ordering of the scripts. Something seems wrong with the code from Google.
I should also add that's it's not just the gtm.preview but if you publish the changes you will not see gtm.video firing with any regularity.
We think that GTM and YT API don't work well together - as per this post.
Google Tag Manager & Youtube Conflict
Related
I am using Twitter API to post status updates programmatically.
However, when my status contains a link, Twitter automatically adds the preview for that link. Sometimes it's not the desired behaviour, however, I didn't find a property in the API to disable it.
I know we can remove the link preview when posting manually via the Twitter website, as described here Remove Preview Image when Posting a Link on Twitter, so I suspect that it's possible, but API never mentions it.
Also, I am using tweepy library for Python, but happy to resort to the raw POST if that solves my problem.
Any ideas what should I add to the request to prevent the link preview generation?
I actually tried to post to Twitter manually on the web, twice:
With the generated link preview
Explicitly removing the preview (clicking the cross button once the preview is generated)
While doing it, I observed the payload that the website sends to the Twitter servers (with Chrome Dev Tools).
And interestingly enough, the only difference between these two tweets was only one property: card_uri: tombstone://card. More specifically, this property was present in the tweet without the preview.
After that, I actually tried to go and add card_uri property to my status update request, and it actually did the job: the preview was not automatically rendered.
Conviniently, tweepy library has an optional card_uri argument in the update_status menthod.
To sum up, you need to set card_uri='tombstone://card' in your request to prevent Twitter from autogenerating the link previews.
Unfortunately, I didn't find any references to this in the API (or in Google at all), so I am not confident that this is a long-lasting solution, but that's at least something to start with.
EDIT: the problem is no longer relevant.
GTM do not affect Youtube API anymore. (In the jsFiddle demo, video informations (state, currentTime, duration) are always correct).
Calling the Google Tag Manager seems to wreck the Youtube API.
Here is a fiddle demo :
Google Tag Manager & Youtube (jsfiddle)
// where thoses methods do not work anymore
player.getPlayerState();
player.getCurrentTime();
player.getDuration();
by commenting the line 16 Youtube API works again (correct state, correct currentTime / duration displayed).
Since the video is still playing, it seems like the js api is disabled.
Any idea to avoid that ?
The GTM container you load in the fiddle has a number of heavy customizations against the YouTube API in Custom JavaScript variables. By disabling / removing those variables, the YT methods on the page should work again.
So this would be a custom scripting issue in the Custom JavaScript variables you have created in GTM, and not a native issue with GTM's built-in functionalities.
I have a web app that was built up using the youtube api v3 and for some reason now .getPlaylistIndex() is always returning -1 this just recently happened and caused a major break in the functionality of the site.
There was no changes in the code base to production over the last week and was working last week, but yesterday (or possibly Monday) it broke. There had to be some change within the API that caused these issues. But I was unable to see anything related to this issue posted anywhere...
If anyone has seen this issue and have some kind of link or reference to what was changed, if it is going to be fixed or if that function was deprecated? The only thing I can do at this point is rework all of my code to get around using this function anymore.
Any insight would be greatly appreciated, thanks.
This ended up an error in implementation that was in our code, but also because of a change in how things worked through the youtube api. The original coder had set up the youtube player to load the playlist, but then they loaded the start video again
channelPlayer.loadPlaylist(currentPlayListArray, selectedVidIdx);
//channelPlayer.loadVideoById(selectedVid); <<<< This was breaking functionality
channelPlayer.playVideo();
channelPlayer.setLoop(true);
channelPlayer.unMute();
This had been working (with the commented out line). Up until last weekend the playlist was not overwritten in the player by the loading of a single video. It seems the functionality has changed where it no longer loads the video ontop of a playlist that was previously loaded. Now it overwrites the playlist of the player instead of concatenating?
Again this was an internal error, but the random change in functionality in the api caused this to actually cause the issue we ran into.
my colleauge and I created a website for a customer last month with several Youtube videos.
http://www.doepfner.de/filme.html
It worked very well and the customer was happy. Then I was 2 weeks on vacation. Now the design of the player has changed slightly. Biggest problem: the full screen button vanished. I tried to use the fs parameter to force it but nothing happend.
Can somebody tell me if it is possible to get the full screen button back or the other design?
This is most likely caused by you getting the HTML5 video player over Flash. This could have happened a couple ways. The most likely is you don't have Flash installed(or didn't at one point) and were opted into an experiment. You can opt out of the HTML5 experiment by going to http://www.youtube.com/html5. This will only effect your browser and not your users, but my guess is they're not having the same issues(assuming they have flash installed).
The other option is a bit of a hack(sort of). If you add webkitallowfullscreen and mozallowfullscreen as attributes to the iframe. This will allow the js fullscreen api to work in Firefox and Chrome. This api is not yet a finalized standard but should be soon.
I've got a content experiment running in Google Analytics and it isn't showing any visitors. The code is validating correctly and appears to be functioning correctly if I test it.
I've used parameterised versions of the same page (?v=1, ?v=2, ...) for the different variations.
It also may be because the experiment is on a search page which receives a parameter of what is being searched on in the URL.
Anyone got any experience with these problems yet?
It seems to take a few hours for my data to start showing up. So depending on how impatient you are it may just take more time.
I also had a problem since I had Enable Demographics and Interest Reports turned on (Question that might help)