E
E
eyespeaker2017-03-13 13:44:55
Yandex.Metrica
eyespeaker, 2017-03-13 13:44:55

Where and how to set the Metrica goal-event code?

Hello!
Site on the symbol. There is the following list of pages: https://gyazo.com/255ba9d5ef35b2909bc428c9bd968511
Question #1
What pages do you need to set goals for in order to track:
1) Buttons "buy in 1 click" and "add to cart" on the product card https://gyazo .com/307fcd0e63e3571bea3c9a744c62e67f
2) The "checkout" button in the pop-up window that opens after clicking on "buy in 1 click" https://gyazo.com/974909a304d6bf2c806adbf85ac1f461
3) The "checkout" button in the shopping cart https://gyazo. com/7b04ca9ed566bf45021775279aa2b68b
4) The "finish order" button on the order continuation page https://gyazo.
When it becomes clear in which files to register, I will show the code and ask you to indicate where to put it in the code. Ideally, if you don't mind, just copy the code from the post and paste the target into it in the answer.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
eyespeaker, 2017-03-13
@eyespeaker

I'm new to the toaster. What do you mean dear?
Thank you!

I
Interface, 2017-12-21
@Interface

First of all, I would advise you to go through the profiler ( https://developers.google.com/web/tools/chrome-dev... and make sure that iteration is the problem. Indeed, 15,000 elements is not the right scale for modern js and hardware to slow down a lot. Perhaps you recalculate on each frame, for example, and then it makes sense to do it less often?
The difference between for and map should be insignificant, especially at such scales.
In general, bypassing is faster than for hardly possible, but maybe you can use other hash table data structures, Map / Set (es6) etc.

A
Anton, 2017-12-21
@SPAHI4

Batch, for example, 1000 per tick.
If complex calculations, then you can output to a web worker so as not to block ui.

M
Maxim Zinchenko, 2017-12-21
@locky42

through each() try

E
Egor Zhivagin, 2017-12-21
@Krasnodar_etc

15k shouldn't be too much even for map. Are you doing this at the front?
The fastest array traversal is for from the last element to the first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question