Skip to main content
Skip table of contents

How to use categorizations within your custom report


Once you have these user defined functions, you will have to use SQL in order to create your report.


Redshift Instructions

Categorizations inside of redshift are very easy to use and do not rely on datasources. They are created as functions.

  1. Click on Reports from the left-hand navigation and Explorer from the top navigation.

  2.  Click on the New Data Report button.

  3. From the Report Type dropdown, select Custom Redshift

  4. You can now create your report using SQL. The following categorization named search_tactic inside of the pmg marketing client:

    This can be referenced in your custom redshift SQL as follows:

    select pmg_marketing.search_tactic(campaign) from pmg_marketing.datasource;

    The field name does not have to match the UI. Since the categorizations are not datasource dependent, you can use any datasource column.

    select pmg_marketing.search_tactic(campaignName) from pmg_marketing.datasource2;
    select pmg_marketing.search_tactic(campaign_name) as tactic, SUM(impressions) from pmg_marketing.google_ads GROUP BY tactic;

  5. If you click Preview on this SQL query, you will see the line items based on the user-defined values created in the Categorization. Check to make sure that your categorizations look correct. You are now able to see your published categorizations in your reports!

BigQuery Instructions

BigQuery categorizations very similar to Redshift

select pmg_marketing.search_tactic(campaign_name) from pmg.datasource; 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.