Need an array of user roles in your Drupal 8 site? Say goodbye to
user_roles(), say hello to
This function will return an associative array with the role id as the key and the role name as the value.
Continue reading “Drupal 8: Get an Array of User Roles”
Looking for how to create new module permissions in Drupal 8? Look no further,
$module.permissions.yml to the rescue!
In Drupal 8 permissions are now defined in
$module.permissions.yml file instead of using
Continue reading “Drupal 8: Create Module Permissions”
Learn to track page performance, user behaviors, personas and more with the power of GA Custom Dimensions.
Creating audience segments is one of the most important things you can do with an analytics tool. When segmentation rules do a good job of highlighting motivations of visitors, behaviors of each segment help make sites become more relevant to each group. This will increase the likelihood that your site will deliver on your goals.
GA already lets you segment more than 130 dimensions. With Universal Analytics, Custom Dimensions (aka. Custom Variables) can be used to track even more. Once you know how to use them, they’ll become a powerful tool in your analytic arsenal. Continue reading “GA Custom Dimensions & Custom Reports”
In the past four years there has been an explosion of new technologies in front-end development. We are inundated with new projects like Bower, Cucumber, Behat and KSS. It is a lot to take in. At the past two Drupalcons there have been sessions about this overload, My Brain is Full: The state of Front-end developement. Essentially those sessions are asking “What the hell is going on?”
Continue reading “Automating Styleguides with Styleguide-Driven Development”
Boost the performance of your Drupal 7 website, improve usability and help with SEO by making content load via AJAX in just a few steps.
Drupal AJAX is a cinch to implement—as it should be since core is loaded with it. In just a few of steps I’ll show you how to use jQuery and Drupal’s
hook_menu() function to quickly build a AJAX function to return anything from HTML to a JSON array.
Continue reading “Simple Drupal 7 AJAX Implementation”
Build awesome apps with Google Analytics API for PHP. Learn how to use the Google Analytics API and PHP to bring data directly to your site or app.
Build some awesome apps and site functionality with Google Analytics API for PHP.
Recently I needed to build a simple web app that uses the Google Analytics API. Google’s documentation on the subject is a little lackluster and with constant updates to their interface, the documentation often times lags behind. Other times steps are completely left out because they don’t need to hold the hands of dummies like me. Well other dummies, I’m here to hold your hand and walk you through how to use the GA API with PHP. Continue reading “Google Analytics API Tutorial with PHP for Dummies”