Forums

Google Analytics for WordPress
cross domain tracking (4 posts)

  1. vzaguski
    Member
    Posted 6 months ago #

    Couldn't enable cross domain tracking - "_link" event is not set for specified domains and they just tracked as outbound articles.

    After looking through code I've found the line that could couse problem.

    Here's the code snippet:
    -----

    } else if ( $target["domain"] != $origin["domain"] ){
    					$crossdomains = explode(',',str_replace(' ','',$options['othercrossdomains']));
    					if ( $options['trackcrossdomain'] && in_array($target["host"],$crossdomains) ) {
    						$trackBit = '_gaq.push([\'_link\', \'' . $matches[2] . '//' . $matches[3] . '\']); return false;"';
    					} else if ( $options['trackoutbound'] && in_array($options['domainorurl'], array('domain','url')) ) {
    						$url = $options['domainorurl'] == 'domain' ? $target["host"] : $matches[3];
    						$trackBit = GA_Filter::ga_get_tracking_link($category, $url,'');
    					}
    					$trackBit = GA_Filter::ga_get_tracking_link($category, $url,'');
    				}

    ------
    [Code moderated: please ensure that your code is enclosed in backticks (`) or use the code button.]

    Actually, the last line in the code is the problem. If I delete it, it seems to work as expected.

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

  2. pblickiss
    Member
    Posted 2 months ago #

    I'm having the same issue, even when disabling outgoing link tracking and commenting out the offending line of code from above. Does anyone have a fix for this in version 4.2.4? All links appear as outgoing whether they are listed in the specified domain list or not. Thanks!

  3. pblickiss
    Member
    Posted 1 month ago #

    Has anyone figured this out? Yoast doesn't appear to frequent this board often. Thanks!

  4. SocialBizzle
    Member
    Posted 2 days ago #

    We have a similar issue. Basically our conversion paths are not being tracked correctly between our site - socialbizzle.com and our payment processor - Fastspring.

    All conversions appear as a 'direct source' even though they are occurring through adwords and other marketing channels.

    I thought the problem would be solved now I have removed the 'track clicks and downloads option'.

    Are you saying that you have done that and it still doesn't work correctly?

Reply

You must log in to post.

About this Plugin

About this Topic