Skip to content

Instantly share code, notes, and snippets.

{
"data": [
{
"action_source": "system_generated",
"custom_data": {
"event_source": "crm",
"lead_event_source": "Your CRM"
},
"event_name": "Lead",
"event_time": 1673035686,
<script>
// script para pegar a cookie de email vindo da GTM para ser utilizado na pesquisa que está na página de obrigado
const campo1 = document.createElement('input')
campo1.type = "hidden"
campo1.id = "ck_email"
campo1.value = document.cookie.split(";").find( row => row.trim().startsWith('em')).split("=")[1]
const formulario = document.querySelector('form')
formulario.append(campo1)
</script>
<script>
(function () {
const parametros = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "fbclid"]
r = new URL(window.top.location.href);
let scks = []
let utms = {}
parametros.forEach((el => {
@edutanaka
edutanaka / teste.js
Last active November 29, 2024 22:48
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<div id="app">{{ message }}</div>
<script>
const { createApp, ref } = Vue
createApp({
setup() {
const message = ref('Hello vue!')
<script>
(function () {
const parametros = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"]
r = new URL(window.top.location.href);
let scks = []
let utms = {}
parametros.forEach((el => {
<script>
(function () {
let parametros = ["utm_source"];
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
// Coletando parâmetros sem duplicatas
for (const [key] of params) {
if (!parametros.includes(key)) {
parametros.push(key);
@edutanaka
edutanaka / gist:38bb6afadb94dc135c277272332eebee
Last active March 15, 2024 00:21
adicionar antes do fechamento da body
<script>
let prefix = ["https://form.typeform.com/to/jbGG1fjo"];
function getParams() {
let t = "",
e = window.top.location.href,
r = new URL(e);
if (null != r) {
let a = r.searchParams.get("utm_source"),
n = r.searchParams.get("utm_medium"),
@edutanaka
edutanaka / gist:0eef6e6ef6d618fa06099c0affb404aa
Created September 3, 2022 14:03
google-collab-my-conf.ipynb
import pandas as pd
import matplotlib.pyplot as plt
from google.colab import drive
plt.style.use('ggplot')
drive.mount('/content/drive', force_remount=True)
%load_ext google.colab.data_table
%autosave 30
windows
#! python3
linux
#! /usr/bin/python3
mac
#! /usr/bin/env python3
<!doctype html>
<html>
<head><title>hello world em ClojureScript</title></head>
<body>
<script src="out/main.js" type="text/javascript"></script>
</body>
</html>