@leifermendez/partytown-qwik
v1.0.7
Published
✌️ Partytown adapter for qwik
Downloads
4
Maintainers
Readme
Qwik Partytown 🎉
This is a package that facilitates the implementation of PartyTown in Qwik. If you don't know what Qwik is See
The implementation is easy, just import and enjoy, if you want to make use of a more advanced configuration you can pass the settings as an argument (see possible arguments).
Ohters Integrations
Qwik Integration
Example Google Analytics
import { QwikPartytown } from "@leifermendez/partytown-qwik/adapter";
<QwikPartytown forward={["dataLayer.push"]} />;
<script
async
type="text/partytown"
src="https://www.googletagmanager.com/gtag/js?id=G-NHJQPYGYCB"
/>;
Example Facebook Pixel > Why need a proxy? View explanation
const proxyFb = function (url: any) {
if (url.hostname === "connect.facebook.net") {
const proxyMap: any = {
"connect.facebook.net": "your-proxy-reverse.cloudfront.net",
};
url.hostname = proxyMap[url.hostname] || url.hostname;
return url;
}
return url;
};
<QwikPartytown resolveUrl={proxyFb} forward={["dataLayer.push", "fbq"]} />;