TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why Cloudflare Bought Zaraz

31 pointsby dknechtover 3 years ago

3 comments

hankchinaskiover 3 years ago
isn&#x27;t this a glorified version of segment?<p><a href="https:&#x2F;&#x2F;zaraz.com&#x2F;engineers" rel="nofollow">https:&#x2F;&#x2F;zaraz.com&#x2F;engineers</a><p>1. User loads a website with the Zaraz script.<p>2. The script notifies the Zaraz backend about the different properties of the visit: page, browser, device, relevant cookies and more.<p>3. The Zaraz backend evaluates the information, and looks for the Facebook Pixel cookie.<p>4. If the Facebook Pixel cookie is included, the Zaraz backend contacts Facebook through the Server-Side API, and registers the page view event with the cookie value. In this scenario, the browser does not load any Facebook script or connect to any Facebook server at all.<p>5. If the Facebook Pixel cookie does not exist, Zaraz bundles the original Facebook Pixel in the response it sends to the browser. It will include all other third-party scripts Zaraz needs to load on the client side – each with their unique settings.<p>6. To prevent the Facebook Pixel from slowing down the page, Zaraz waits until the website reaches interactivity before executing it. Once the Facebook Pixel is loaded for the first time, a cookie will be created, which Zaraz picks up and uses to avoid loading the script again in all future events.<p>7. If the user leaves the website before the Facebook Pixel was loaded, Zaraz uses its Load On Exit technique to still send the page view event to Facebook. It does so by constructing all the request parameters on the backend and attaching a simple fetch call to the page unload event. No data is lost and all page views are recorded.
评论 #29489592 未加载
评论 #29489522 未加载
skybrianover 3 years ago
I&#x27;m wondering if this makes things easier or harder for ad blockers? I guess they could remove the Zaraz script?
评论 #29496348 未加载
DarthNeboover 3 years ago
Wish they&#x27;d also answer why they felt benchmarking Fastly CDN &amp; publishing skewed results was alright, but their own ToS expressly prohibits benchmarking Cloudflare services
评论 #29486638 未加载
评论 #29486357 未加载