This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Button, Frame, Page, Select, Text } from '@shopify/polaris' | |
import polarisStyles from '@shopify/polaris/build/esm/styles.css' | |
import { useCallback, useMemo, useState } from 'react' | |
import { AppProvider } from '@shopify/shopify-app-remix/react' | |
import { json, LoaderFunctionArgs } from '@remix-run/node' | |
import { env } from '~/env.server' | |
import { useLoaderData } from '@remix-run/react' | |
export async function loader({ request }: LoaderFunctionArgs) { | |
return json({ apiKey: env.SHOPIFY_API_KEY || '' }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import { | |
reactExtension, | |
Divider, | |
Image, | |
Banner, | |
Heading, | |
Button, | |
InlineLayout, | |
BlockStack, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1. Add and initialize your third-party JavaScript pixel (make sure to exclude HTML) | |
// Make sure you update you GTM- Tag id | |
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-XXXXXXX'); | |
window.dataLayer = window.dataLayer || []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1. Add and initialize your third-party JavaScript pixel (make sure to exclude HTML) | |
// Replace with you GA4 Tag | |
const TAG_ID = 'G-XXXXXXXXXX'; | |
const script = document.createElement('script'); | |
script.setAttribute('src', `https://www.googletagmanager.com/gtag/js?id=${TAG_ID}`); | |
script.setAttribute('async', ''); | |
document.head.appendChild(script); | |
window.dataLayer = window.dataLayer || []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Click the copy button in the right-hand corner. | |
blank() | |
{ | |
__V="2.20.0" | |
__H=" | |
Blanklob utils to work seamlessly with Shopify CLI $__V | |
USAGE | |
blank <command> [options] |