bem-contrib/stat-counters

Events emitting methods

awinogradov opened this issue · 3 comments

Events emitting methods

Can you provide more info? What issues it should resolve?

Emit events from JS logic. When user select goods over 4, emit event ;)

ixax commented

Suppose we want to send to the metric params {foo: {}}
This is usually done so: yaCounterXXX.param({foo: {}})
If the metric at the moment is not available — we will get error like yaCounterXXX is undefined

We can modify the code: Metrika.trackParams({foo: {}}):

  1. There is an attempt to send params, if the metrika has loaded
  2. The attempt to load metrika, immediately passing parameters
  3. Funny the third option