Custom asset
Use this block to load a custom stylesheet, JavaScript file, or third-party integration on the template where the block is added. It is best for advanced, page-specific code that should run only in selected areas instead of across the entire store. For context on where blocks live in themes, see Shopify documentation on sections and blocks
The code field expects a complete asset tag, such as a full script tag or stylesheet link tag. For a quick reference, see the source-provided Custom asset guide.
Paste the full asset tag exactly as it should load. This block is intended for complete includes, not partial snippets, so incomplete tags or missing attributes can prevent the asset from working properly.
When adding an external service, use the provider’s recommended embed or asset tag and test the result on the template where the block appears. If you are adjusting the block in the theme editor, Shopify documentation on customizing sections can help explain how block content is managed there. This is especially important when the code depends on page-specific content, customer interactions, or existing styles.
Only add code you trust and understand. A conflicting script or stylesheet can disrupt layout, interactions, tracking, or performance on the template where this block is used.
Standard block settings
Section titled “Standard block settings”Editor settings
Section titled “Editor settings”These settings only affect how the block is labeled in the theme editor. Rename the block when needed so you can quickly identify what each custom asset does, especially if you use multiple assets in the same template.
Usage notes
Section titled “Usage notes”- Keep placement intentional. Add the block only on templates that truly need the asset so unnecessary code does not load elsewhere.
- Use complete tags. Paste the full script or stylesheet include rather than partial code so the asset can load correctly.
- Label blocks clearly. Update the editor title to reflect the service or purpose, which makes future edits much easier.
- Test on real layouts. Check both desktop and mobile views after adding an asset, since custom code can affect spacing, alignment, visibility, and media behavior differently by viewport.
- Watch for context-sensitive behavior. If your asset changes product or cart interactions, verify it with different variants, quantities, availability states, and commerce actions so the result matches the page context.
- Avoid duplicate loads. Do not include the same external asset multiple times on one template unless the provider specifically requires it.