• 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/

Viewing 3 replies - 16 through 18 (of 18 total)
  • Upgraded to 4.2.8, is problem still there? This thread says to edit lines, but does not say what file.

    I’m running 4.2.8 and the problem still exists.

    I’ve found and deleted the extraneous double quote (line 1218) as well as commented out the line that apparently ignores the previously set $trackBit variable (line 1223) and these fixes seem to work.

    Hopefully the developers will address these small issues in their next update.

    @anointed – It’s the main file – the first one you see in the plugin editor.

Viewing 3 replies - 16 through 18 (of 18 total)

The topic ‘[Plugin: Google Analytics for WordPress] cross domain tracking’ is closed to new replies.