R
R
Raeel2019-07-10 15:23:29
Bitrix24
Raeel, 2019-07-10 15:23:29

Add a goal (javascript event) for Yandex metrics if link editing is not available?

There is a site on the Sites24 constructor as Bitrix24 functionality.
There is no access to editing the link code on the phone number (tel).
The link code is:

<a href="tel:88002463811" class="landing-block-node-menu-contactlink-link g-pa-10--md row align-items-center justify-content-center justify-content-sm-start justify-content-md-center justify-content-lg-start g-text-decoration-none--hover" target="_self"> 	<span class="landing-block-node-menu-contact-img-container text-left text-md-center text-lg-left w-auto g-width-100x--md g-width-auto--lg g-font-size-18 g-line-height-1 d-none d-sm-inline-block g-valign-top g-color-primary g-mr-10 g-mr-0--md g-mr-10--lg">
                      <i class="landing-block-node-menu-contact-img icon icon-screen-smartphone" data-pseudo-url="{&quot;text&quot;:&quot;&quot;,&quot;href&quot;:&quot;&quot;,&quot;target&quot;:&quot;_self&quot;,&quot;enabled&quot;:false}"></i>
                    </span>
                    <span class="landing-block-node-menu-contactlink-text-container text-center text-sm-left text-md-center text-lg-left d-inline-block">
                      <span class="landing-block-node-menu-contactlink-title  landing-block-node-menu-contact-title-style g-color-main d-block text-uppercase g-font-size-13">Надо срочно позвонить</span>
                      <span class="landing-block-node-menu-contactlink-text landing-block-node-menu-contact-text-style d-block g-color-gray-dark-v2 g-font-weight-700 g-text-decoration-none g-text-underline--hover">8 (800) 246-38-11</span>
                    </span>
                  </a>

It is possible to add your own script.
How to add a target for this link through a script for implementation
yaCounterXXXXXX.reachGoal('TARGET_NAME')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2019-07-10
@Eridani

$('[href="tel:88002463811"]').click(function(){
  yaCounterXXXXXX.reachGoal('TARGET_NAME')
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question