Template Guides
Available Variables
The following methods are available to call in your Twig templates:
craft.metrix.getAllSources()
Returns a collection of Source objects.
craft.metrix.getAllEnabledSources()
Returns a collection of enabled Source objects.
craft.metrix.getAllConfiguredSources()
Returns a collection of configured Source objects.
craft.metrix.getSourceById(id)
Returns a Source object by its ID.
craft.metrix.getSourceByHandle(handle)
Returns a Source object by its handle.
Last updated: May 4, 2026, 9:12:06 AM