Installation
Install the Big Crunch script on your website to start tracking analytics and serving ads. Choose between a tag integration (recommended) or JavaScript integration.
Tag Integration (Recommended)
Replace PROPERTY_ID with the Property ID for your website.
Add the following script tag to the <head> section of your website. The script will load asynchronously without blocking page rendering.
<script
src="https://1h.bigcrunch.com/main.js"
data-property-id="PROPERTY_ID"
id="bigcrunchtag"
crossorigin="anonymous"
async=""
></script>
Attributes
- src - The Big Crunch script URL
- data-property-id - Your unique property identifier (required)
- id - Fixed identifier for the script tag
- crossorigin - Set to "anonymous" for CORS
- async - Loads the script asynchronously
JavaScript Integration
If the tag integration doesn't work in your environment, you can use the JavaScript implementation:
Replace PROPERTY_ID with the Property ID for your website.
var bc_script = document.createElement("script");
bc_script.async = "async";
bc_script.crossOrigin = "anonymous";
bc_script.src = "https://1h.bigcrunch.com/main.js";
bc_script.id = "bigcrunchtag";
bc_script.setAttribute("data-property-id", "PROPERTY_ID");
document.head.appendChild(bc_script);
When to Use JavaScript Integration
Use the JavaScript integration when:
- Your CMS or framework doesn't support direct script tag insertion
- You need to conditionally load the script based on certain criteria
- You're working with a JavaScript-heavy application
- The tag integration method is blocked by your environment
Support
Need help with script integration? Contact support at support@bigcrunch.com.