Use Cases
The Custom JavaScript module enables you to add custom scripts to your Perfex CRM installation without modifying core files. Below are common use cases that demonstrate the versatility of this module.
Google Analytics Trackingโ
Add Google Analytics tracking to monitor how users interact with your CRM or client portal:
- Paste your Google Analytics tracking code snippet into the module's code area
- Track page views, user sessions, and navigation patterns
- Gain insights into which CRM sections are used most frequently
When adding Google Analytics, paste only the JavaScript tracking snippet provided by Google. The module handles script injection, so you do not need to include <script> tags if the module's configuration does not require them โ follow the module's input format.
Custom UI Enhancementsโ
Make visual and functional modifications to the CRM interface:
- Adjust styling or layout of specific CRM pages
- Add custom buttons, tooltips, or visual indicators
- Modify the appearance of elements to match your organization's branding
- Implement small usability improvements tailored to your team's workflow
Custom UI enhancements are ideal for small, targeted changes. For larger modifications, consider developing a dedicated Perfex CRM module instead.
Third-Party Widget Integrationsโ
Integrate external services and tools directly into your CRM:
| Widget Type | Examples |
|---|---|
| Live Chat | Embed third-party chat widgets (e.g., Tawk.to, Crisp, Intercom) |
| Support Tools | Add external helpdesk or knowledge base widgets |
| Feedback Collection | Integrate survey or feedback tools into the client portal |
| Marketing Tools | Add retargeting pixels or marketing automation scripts |
When embedding third-party widgets, ensure the external service is reputable and the script does not conflict with Perfex CRM's existing JavaScript. Test thoroughly after adding any external widget.
Event Tracking Scriptsโ
Implement custom event tracking to monitor specific user actions within your CRM:
- Track button clicks, form submissions, or page interactions
- Send event data to analytics platforms for reporting
- Monitor specific workflows to identify bottlenecks or drop-off points
- Log custom events for audit or compliance purposes
Best Practicesโ
- Test in a staging environment first โ Always test custom scripts in a non-production environment before deploying to your live CRM
- Keep scripts minimal โ Only add the code you need; unnecessary scripts can slow down page load times
- Document your scripts โ Add comments to your code so you or your team can understand the purpose of each script later
- Monitor for conflicts โ After adding scripts, check the browser console for JavaScript errors that may indicate conflicts with CRM functionality
- Update when needed โ If a third-party service updates their embed code, remember to update your scripts accordingly
Avoid adding scripts that modify core CRM functionality or override critical JavaScript functions. This can cause unexpected behavior and make troubleshooting difficult.
Supportโ
If you need help with a specific use case or encounter issues after adding custom scripts, please visit the Themesic Support Portal to open a support ticket.