@leifermendez/partytown-qwik

1.0.7 • Public • Published

Qwik Partytown 🎉

Partytown github fit 2x


Build and Test 🚀 Publish

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"]} />;

More Docs / Community

Package Sidebar

Install

npm i @leifermendez/partytown-qwik

Weekly Downloads

0

Version

1.0.7

License

ISC

Unpacked Size

16.6 kB

Total Files

5

Last publish

Collaborators

  • leifermendez