M
M
misterion2014-12-01 12:21:47
Yandex
misterion, 2014-12-01 12:21:47

Workaround to override referer using Yandex Metrika?

In order to ask correctly , a little background is needed .
We use cookie based authorization on our website. The site and the authorization service are located on different domains. If there is no information in the user's active session that he is authorized, we performed a 301 redirect to the authorization server and returned the user with 301 redirects back to the original site with data sufficient to initialize the session.
In this story, everything is fine, except that some part of the search robots did not take such redirects very well. About a month ago, we changed the authorization procedure - we switched from 301 redirects to the authorization server to ajax requests and page refresh if the user is authorized via a cookie. Roughly speaking - if there is no session, download a js script from the authorization service and execute an ajax request (cookies will be sent) to the authorization service. If the user is logged in, we refresh the page.
This is where the problem starts:
It is expected that the Yandex metric began to show not external sites, but ourselves in the referral sources - we redirect the user on the client and therefore interrupt the referer. We could wait on the page for the complete initialization of the counter and move on only after that, but how did the statistics go, but it sometimes takes from a few seconds to a dozen. At the same time, we ourselves store information about where the user came from and could tell the counter what he needs to send.
For example, Google Analytics has _setReferrerOverride .
Is it possible to explicitly specify the source of the transition to the Yandex counter? I saw such possibility in api for ajax/flash sites. Is this possible in the normal case? Do they have something similar?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question