W
W
Windons2016-09-29 12:53:17
Yandex
Windons, 2016-09-29 12:53:17

How to set yandex target to CALL NOW button?

Created a goal in the identifier metric: CALL code 23699000
Here is the button code (it is visible only on mobile devices)
<?php
//version 1.1
// no direct access
defined('_JEXEC') or die;
class plgSystemDD_CallNow_Button extends JPlugin{
function plgSystemDD_CallNow_Button(&$subject, $config) {
parent::__construct($subject, $config);
$this->loadLanguage('', JPATH_ADMINISTRATOR);
}
public function onAfterRender(){
$app =& JFactory::getApplication();
if ($app->isAdmin()) return false;
?>
<?php
$str = '';
$number_to_call = $this->params->get('number_to_call', '
$color_bg = $this->params->get('color_bg', '#1191D0');
$callnow_button_text = $this->params->get('callnow_button_text','Call Now');
$str = ' '; if ($callnow_button_text){$str .= $callnow_... ';
$buffer = JResponse::getBody();
if ($buffer) {
$str_re = str_replace("

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daemon23RUS, 2016-09-29
@Daemon23RUS

You have demonstrated the wrong side of the code, here is a part of the code that may help you (23699000 = account number, showdetalied procedure = calls a modal window, but you need to correct it for your task)

<div class="container" onclick="showdetalied('019');yaCounter23699000.reachGoal('CALL'); return false;">

W
Windons, 2016-09-30
@Windons

I don’t understand how to generate the counter code, where it needs to be installed!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question