Skip to content

Instantly share code, notes, and snippets.

No head
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
@LucasGorgal
LucasGorgal / code.js
Created January 24, 2023 00:03
Trackeamento por botão da aula 1
Botão 1 (Entrar grupo WhatsApp):
gtag('event', 'acao_blog_cpl', {
'aula': '1',
'passo': '1',
'acao': 'entrar grupo whatsapp'
});
@LucasGorgal
LucasGorgal / all.html
Created January 23, 2023 23:57
Trackeamento todas as páginas (Analytics 4 + FB Pixel + GAds Tag)
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-QCJZBJ31CG"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-QCJZBJ31CG');
</script>
<!-- Meta Pixel Code -->
@LucasGorgal
LucasGorgal / index.html
Created October 19, 2021 01:09
recaptcha
<!DOCTYPE html>
<!--[ page_style CHECK = p ]-->
<!--[if IE 8]>
<html id="ie8" lang="pt-BR"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://ogp.me/ns/fb#" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
@LucasGorgal
LucasGorgal / ep.php
Created October 13, 2021 13:54
VPO_202110
<?php
$ep = $_GET['ep'];
if($ep == '1') {
$video_id = "ZacEikh8kVQ";
} elseif($ep == '2') {
$video_id = "3wJo0_zqi3s";
} elseif($ep == '3') {
$video_id = "gu-Jz6b7DzQ";
@LucasGorgal
LucasGorgal / redirecionador.js
Last active September 3, 2021 17:35
Redirecionador temporal
date = new Date();
let timeSaoPaulo = date.toLocaleString('pt-BR', {timeZone: 'America/Sao_Paulo'});
let meAvisaURL = 'https://metodoreorganize.com.br/meavisa';
let matriculaURL = 'https://metodoreorganize.com.br/matricula-teste';
if(timeSaoPaulo <= "02/09/2021 20:00:00") { //Redireciona para o /meavisa até dia 02/09 às 20h
window.location.replace(meAvisaURL);
} else if(timeSaoPaulo > "02/09/2021 20:00:00" || timeSaoPaulo <= "11/09/2021 00:00:00") { //Redireciona para /matricula entre 02/09 de 20h até 11/09 até 00h
window.location.replace(matriculaURL);
@LucasGorgal
LucasGorgal / redirect.php
Created August 28, 2021 22:57
deeplink yt com pixel
<?php
$video_id = "a8D1eF5NBCg"; //Id do vídeo do YT
$ipod = stripos($_SERVER['HTTP_USER_AGENT'], "iPod");
$iphone = stripos($_SERVER['HTTP_USER_AGENT'], "iPhone");
$android = stripos($_SERVER['HTTP_USER_AGENT'], "Android");
if($ipod || $iphone) {
$url = "vnd.youtube://www.youtube.com/watch?v=$video_id&v=$video_id";
<?php
$email = $_POST['email'];
$time = time();
$event_id = hash("sha256", $email .$time);
//FB token
$access_token = 'FACEBOOK ACCESS TOKEN';
//Insert into FB
@LucasGorgal
LucasGorgal / vpo_202107-redirect.php
Created July 22, 2021 14:36
VPO_202107 CPL Redirect
<?php
$cpl = $_GET['cpl'];
if($cpl == 1) {
$video_id = "ArqNAoReTtI";
$google_ads_conversion = "AW-941768981/F3JqCKun69oCEJWCicED";
} elseif($cpl == 2) {
$video_id = "qSy16Sop8AI";
$google_ads_conversion = "AW-941768981/5M_oCOqw69oCEJWCicED";
@LucasGorgal
LucasGorgal / redirect.php
Created July 12, 2021 02:50
Redirecionador com Conversion API
<?php
$userIP = $_SERVER['REMOTE_ADDR'];
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$fbclid = $_GET['fbclid'];
$fbc_cookie = "fb.1." .round(microtime(true) * 1000) ."." .$fbclid;
$page_url = "https://site.com/redirecionamento.php"; //endereço onde está localizado o script