Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
El HTML personalizado de GoogleTagManager no funciona bien para poner números en las variables

Problema

Estoy creando HTML personalizado con GoogleTagManager, pero no puedo poner una cadena de números en getTimeStamp . Además, GTM no es compatible con ES6, por lo que es fundamental escribir ES5.

código

 <script> function formatDate(dt) { var y = ('00'+dt.getFullYear()).slice(-2); var m = ('00' + (dt.getMonth()+1)).slice(-2); var d = ('00' + dt.getDate()).slice(-2); var h = ('00' + dt.getHours()).slice(-2); var mm = ('00' + dt.getMinutes()).slice(-2); return (y + m + d + h + mm); } nowDate = formatDate(new Date()); var getTimeStamp = nowDate; if (!window.dtlpcvCvConf) { window.dtlpcvCvConf = []; } window.dtlpcvCvConf.push({ siteId: "xxx", commitData: { pid: "xxxx", amount: "", mid: "", u: getTimeStamp, t:"xxx", cvinfo:"xxx" } }); </script> <script src="https://dep.tc/public/js/lpcv.js?cid=xxx&pid=xxx&t=xxx" async="async"></script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!