Track anchor links in war chains

On my site I have a form that covers 2 steps, each step 1 returns to the same page and loads the second part of the form. The only difference between steps 1 and 2 in the url is the anchor text in the url

eg.

STEP 1: www.mysite.com/enquiry/ STEP 2: www.mysite.com/enquiry/#message

Is it possible to track them in targeted funnnels? If I didn’t have to hardcode some tracking file in GA code?

+1
source share
1 answer

_setAllowAnchor(bool)will not solve your problem; which is a feature that allows Google Analytics to read campaign line items from the anchor (i.e #utm_medium=cpc..)

- - jQuery.

, IE: http://benalman.com/code/projects/jquery-hashchange/docs/files/jquery-ba-hashchange-js.html

hashchange, "" , Google Analytics.

   $(window).hashchange( function() {
       _gaq.push(['_trackPageview',location.pathname+location.search+location.hash]);
    });
});

, .

GA /enquiry/#message.

+2

Source: https://habr.com/ru/post/1762739/


All Articles