0

I need to change value of SEO-goals (onclick) on the multi domain website. And I found this thing on the project server(MODX): onclick="yaCounter[[++[[*context_key]].yaKey]].reachGoal('something'); return true;" And if I change this text it changes everÿwhere. What is the best solution to make it works?

Maximus Dredoff
  • 306
  • 3
  • 17
  • Are you referring to google analytics? You create a new goal within GA if that's what you require, then you can move forward from there. – Steve Sep 01 '15 at 09:47

1 Answers1

1

[[++[[*context_key]].yaKey]] - this is tricky solution for multidomain sites. First modx set [[*context_key]] and for web context this means you get - [[++web.yaKey]], and then modx get web.yaKey system setting and set it to the page. So - you need to create system setting for every context with the name "context_key.yaKey".

Vasis
  • 2,281
  • 1
  • 16
  • 23
  • ok, but wherefrom it takes current value now(some numbers of counter and they are different in this 2 domains)? I can't find something like this in system settings or context settings. Sorry for this question) – Maximus Dredoff Sep 01 '15 at 14:21
  • 1
    You can find these keys in system settings as well as in context settings. To see context settings, either right click on context name in the left site tree, choose _Edit Context_, then choose the 2nd tab on the page. Or you could go to the contexts management view from Gear Icon on top bar and then Contexts. – Zaigham R. Sep 01 '15 at 16:24