Use custom code on your ActiveCampaign page: Difference between revisions
(SEO-optimized content from ActiveCampaign documentation) |
(No difference)
|
Latest revision as of 20:34, 3 November 2025
```mediawiki Navigation: Main_Page > Pages > Use custom code on your ActiveCampaign page
Use custom code on your ActiveCampaign page[edit | edit source]
ActiveCampaign provides users with the ability to embed custom code on their pages, enabling advanced functionality and customization options. This feature is particularly useful for integrating analytics, custom scripts, or external content such as maps and schedules. Understanding how to effectively use custom code on your ActiveCampaign pages can enhance user engagement and provide deeper insights into visitor behavior.
This article outlines the methods available for adding custom code to your ActiveCampaign page, along with best practices and troubleshooting tips.
How to Access This Feature[edit | edit source]
To access the custom code settings for your ActiveCampaign pages, follow these steps:
1. Navigate to your ActiveCampaign dashboard. 2. Click on Website in the left sidebar. 3. Select Pages to view your existing landing pages.
Once you're in the Pages dashboard, you can begin adding custom code to your desired page.
Step-by-Step Instructions[edit | edit source]
There are two primary methods for adding custom code to your ActiveCampaign pages: under Page Settings and using the Embed block.
Add Custom Code to Your Page's Settings[edit | edit source]
To embed script tags or analytics tracking code directly in your page settings:
1. **Click** the dropdown next to the Edit design button for the selected page. 2. **Select** View Page Settings. 3. Navigate to the Custom Code tab. 4. You will see two fields under Custom Code: <head> and <body. Type your desired code into one of these fields.
Custom Code Head and Body sections
5. If you're adding Google Analytics code, ensure it is placed within the <head> section. For further instructions, refer to the article on How to add your Google Analytics code to your ActiveCampaign page. 6. **Click** the Save button to apply your changes. 7. To publish these changes, **click** the Republish From Designer button.
Republish from Designer button
8. Finally, **click** the Publish Updates button to make your changes live.
Publish Updates Button
Add Custom Code Using the "Embed" Block[edit | edit source]
To add an interactive element like a Google Map or Calendly widget to your page:
1. Locate the Embed block in the right pane of the page builder interface. 2. **Drag** the Embed block into your desired location on the page layout.
3. **Paste** your custom code into the code editor provided between the two paragraph tags
found in the right pane. Landing page embed block It is important to note that while you may use the Embed block to add an ActiveCampaign form, it is recommended to utilize the Inline Form block instead for optimal performance. For more details, visit the Use the Inline Form block article.
Configuration Options and Settings[edit | edit source]
When adding custom code, you have several options to consider:
- <head>: This section is reserved for meta tags, links to stylesheets, and scripts required by your page. Custom scripts or tracking codes, such as Google Analytics, should be added here.
- <body>: This section is typically used for on-page scripts or elements that should load after the main content of the page.
Best Practices and Tips[edit | edit source]
1. Test Your Code: Before going live, test the custom code to ensure it does not interfere with the functionality of your landing page. 2. Keep It Minimal: Aim to use only essential scripts to reduce loading times and improve user experience. 3. Analytics Tracking: Utilize analytical tools like Google Analytics for deeper insights, placing tracking codes correctly within the <head> section. 4. Avoid Conflicts: Be cautious when adding third-party scripts. Ensure they do not conflict with ActiveCampaign functionality or other scripts. 5. Documentation Reference: Always reference ActiveCampaign documentation for guidelines on specific integrations and code snippets.
Troubleshooting[edit | edit source]
If you experience issues after adding custom code:
- **Check Code Accuracy**: Ensure there are no syntax errors in your code.
- **Browser Compatibility**: Test the page in different browsers to identify potential compatibility issues.
- **Script Conflicts**: Disable scripts one at a time to determine if specific code is causing problems.
- **Clear Cache**: Sometimes changes may not appear due to browser caching; consider clearing your browser cache or trying incognito mode.
FAQ[edit | edit source]
1. Can I use any type of script in the custom code sections?[edit | edit source]
You can use any script that does not conflict with ActiveCampaign’s functionalities. However, be cautious with third-party scripts and ensure they follow best practices.
2. Where should I put my Google Analytics tracking code?[edit | edit source]
Your Google Analytics tracking code should be placed within the <head> section of the custom code.
3. Will I be able to see the custom code in the Page Builder?[edit | edit source]
No, custom code added in the Page settings can only be viewed when the page is live. It cannot be viewed in the Page Builder interface.
4. Can I use the Embed block for all types of custom code?[edit | edit source]
The Embed block is best for embedding interactive content such as calendars or maps. For other scripts, use the custom code fields in the settings.
5. How do I troubleshoot if my custom code isn’t working?[edit | edit source]
Check for syntax errors, ensure compatibility across browsers, and clear your cache to rule out display issues.
6. Is there a limit to how much code I can add?[edit | edit source]
While there is no explicit limit mentioned, it is best to keep your custom code necessary and optimized to avoid performance issues.
7. What should I do if I encounter script conflicts?[edit | edit source]
Disable each script one at a time to identify any conflicts and consult the support documentation for guidance on resolving compatibility issues.
For more information on custom code use, please refer to the relevant sections in ActiveCampaign's help articles. ```