Metrika's Webvisor 2.0
vladimirlogachev opened this issue · 5 comments
Metrika's Webvisor 2.0 requires changes in code.
Here is what I've noticed about it:
Before: w.yaCounterXXX = new Ya.Metrika({
After: w.yaCounterXXX = new Ya.Metrika2({
Before: s.src = "https://mc.yandex.ru/metrika/watch.js";
After: s.src = "https://mc.yandex.ru/metrika/tag.js";
Before: })(document, window, "yandex_metrika_callbacks");
After: })(document, window, "yandex_metrika_callbacks2");
Can we expect this Component to change?
Or is there a way to set it up without changing code?
Anyways, thank you for your work.
Or is there a way to set it up without changing code?
Not yet.
Can we expect this Component to change?
Sure!
I would do that in a straightforward approach: introduce a version
prop to the initializer component.
But still, I'd like to have a documentation on these changes, or at least a way to test my new code.
If I make those changes, would you like to test the new version yourself? (Since I don't have an access to the 2.0 version yet.)
I'd like to test it on my site with standard «check if counter is installed» icon, of course.
It reacts on 2.0 changes.
But I don't know if there is something else changed in their API, so I can't help a lot.
I'm only using these parameters:
<YMInitializer
accounts={[XXXX]}
options={{
clickmap: true,
trackLinks: true,
accurateTrackBounce: true,
webvisor: true,
trackHash: true,
}} />
Got it. Will do that some time later today or tomorrow.
I've just published v2.1.0, please check it out.
Thank you, it works!