Analytics Code Appearing on Home Page

Asked

Viewed 512 times

0

For some reason the code of Google Analytics is appearing on the home page of a client of mine and I am not able to remove it from there. And at the same time, obviously, I need it to keep working.

Aqui estão as opções que foram usada para o código:

The code went like this:onClick="ga('send', 'event', 'Forms', 'Click');"

It was inserted at the end of the HTML editor inside the CMS. All the content below is inside the BODY tag. And it was like this:

<script type="text/javascript" async src="https://d335luupugsy2.cloudfront.net/js/loader-scripts/2c4203a9-ed9e-4af1-94f8-d40cb871826f-loader.js" ></script>
<script type="text/javascript" src="https://d335luupugsy2.cloudfront.net/js/integration/stable/rd-js-integration.min.js"></script>
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script type="text/javascript">

function sendContactToRD(event){
  event.preventDefault();
  var form = jQuery(event.target).closest('form');
  var data_array = form.find(':input').serializeArray();
  data_array.push(
    { name: 'identificador', value: 'Contato' },
    { name: 'token_rdstation', value: '3b186d9de846a1105cb4fe3ef63b8e95' }
  );
  RdIntegration.post(data_array, function(){
    buttonContato.unbind('click', sendContactToRD).click();
    buttonContato.bind('click', sendContactToRD);
    return false;
  });
}

jQuery(document).ready(function(){
buttonContato = jQuery(':submit');
buttonContato.bind('click', sendContactToRD);
});
</script>

<!-- Google Code for Espa&ccedil;o Exato - Tag de Convers&atilde;o Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 968350051;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "j1WcCImatnIQ47LfzQM";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/968350051/?label=j1WcCImatnIQ47LfzQM&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<!-- Código do Google para tag de remarketing -->
<!--------------------------------------------------
As tags de remarketing não podem ser associadas a informações pessoais de identificação nem inseridas em páginas relacionadas a categorias de confidencialidade. Veja mais informações e instruções sobre como configurar a tag em: http://google.com/ads/remarketingsetup
--------------------------------------------------->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 968350051;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/968350051/?guid=ON&amp;script=0"/>
</div>
</noscript>

onClick="ga('send', 'event', 'Forms', 'Click');"

And finally, the code appears there in the upper left corner of the home page that way: inserir a descrição da imagem aqui

I already apologize if it’s a stupid question (I couldn’t find a solution in Google) or anything else stupid, this is my first topic. Thank you in advance.

  • 3

    This code was to be an attribute in some HTML element. Just at the end as you put it is interpreted as normal content. Which element should be clickable and register the event in Analytics?

  • I will ask the client and I already answer you, I was not that developed and received this job with little information. Then I can enter the code in the Analytics in the HEAD of the HTML home page for it to work right?

  • Basically, this code does not work. If it is not needed, remove it. But if necessary, you have to follow @bfavaretto’s instructions.

  • I’ll do it yes @Tonymontana, it makes a lot of sense his guidance. I’ll just wait for the client to answer me which element is associated with the Analytics event while I look around here. Unfortunately I have very little experience with Analytics. Read little "virtually nothing".

  • @bfavaretto all forms of the site should record the event of analyticis. This information is sufficient?

  • So I don’t know if I can help you much. But try changing the tags <form> and include that. It’s going to look something like this: <form onsubmit="ga('send', 'event', 'Forms', 'Submit');">. Do not remove other attributes from the Forms (action, method etc).

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.