November Happy Hour will be moved to Thursday December 5th.

EPiServer Google Analytics "track external links" breaks fancybox.iframe links

Vote:
 

Hello,

If you have the option "Track clicks on external links" enabled under Admin -> Config -> Google Analytics -> Configure tracking -> Links & Downloads. Then all links with the class "fancybox fancybox.iframe" will open the overlay but then redirect away from the site to the destination url for the iframe instead of opening the content in an iframe in the overlay. This took me many many hours to figure out what the cause was and track it down.

I did eventually find some weird javascript code that is coming from the EPiServer Google analytics plugin that is trying to do some magic with "fancybox" classed links but it's obviously not working. By reading more of that Javascript code I figured out that there seems to be a setting somewhere that could disable this bad behavior and I did track that one down to "Track clicks on external links" as well. If that switch is disabled our "fancybox fancybox.iframe" classed a-tags start working as they should again but obviously the plugin is no longer tracking clicks on external links.

An example of links that were broken before we disabled this can be seen here: https://www.piab.com/sv-SE/Produkter/vakuumpumpar/kompaktstapelbar/picompact232/#product-support those youtube video links are supposed to open in an overlay and an iframe and play but instead they were redirecting directly to youtube.com and leaving Piab.com.

#147580
Apr 19, 2016 10:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.