Drupal
Integrate analytics.tube Analytics with your Drupal site using the analytics.tube module
Drupal is a flexible and secure content management system that features robust content modeling and user management tools. You can add analytics.tube to Drupal to track anonymous and logged-in users.
How to Add analytics.tube to Drupal
You can add analytics.tube to your site by installing the analytics.tube module from Drupal.org
Get Your Tracking Script
First, you'll need your analytics.tube tracking script. You can find this in your analytics.tube dashboard under Site Settings > Tracking Code. It will look something like this:
<script defer src="https://app.analytics.tube/api/script.js" data-site-id="YOUR_SITE_ID"></script>Replace YOUR_SITE_ID with your actual Site ID from your analytics.tube dashboard.
Download and install the analytics.tube module
Follow Drupal's recommended procedure for installing the analytics.tube module from https://www.drupal.org/project/analytics.tube:
$ composer require drupal/analytics.tube
$ drush en analytics.tubeConfigure module settings
Visit admin/services/analytics.tube and add your Site ID to the site's configuration page.
You can also modify the script's source and loading optimizations, set rules for when the script gets loaded, and configure the site to use the identify() method to pass details about logged-in users from Drupal to analytics.tube.
Verify Integration
Test Your Integration
- Open your live Drupal website in a browser.
- Navigate through a few pages.
- Check your analytics.tube dashboard for incoming data. It might take a few minutes for the first events to appear.
That's it! analytics.tube Analytics should now be integrated with your Drupal site.