Hi, I have the following String
:
String in PHP:
$boton = " <a href='tel:+525550257358' onclick='ga(\'send\', \'event\', \'llamar contacto\', \'llamar3\', \'clic3\');' style='text-decoration:none; color: #666; font-size: 18px; font-weight:bold;'> Teléfono: 5025 7358 </a>";
Original button in HTML
<a href='tel:+525550257358' onclick='ga('send', 'event', 'llamar contacto', 'llamar3', 'clic3');' style='text-decoration:none; color: #666; font-size: 18px; font-weight:bold;'> Teléfono: 5025 7358 </a>
Let me explain: it is a button that contains a Google Analytics code, I tried to use what they call ESCAPED QUOTES and it doesn't work, in the frontend the button is displayed but it doesn't register the event of the onclick function, just where the function ga('send', etc, etc).
This is the format with ERROR that shows me in the front, for which it does not work:
<a href="tel:+525550257358" onclick="ga(\" send\',="" \'event\',="" \'llamar="" contacto\',="" \'llamar3\',="" \'clic3\');'="" style="text-decoration:none; color: #666; font-size: 18px; font-weight:bold;"> Teléfono: 5025 7358 </a>
Try escaping the double quotes like this: