Skip to content

Exclude Breadcrumbs

configurations/exclude-breadcrumbs.js

Within each report page, the user can navigate through their data either by clicking dimensions in the table or selecting resources in the breadcrumb dropdown list:

An example of the breadcrumbs dropdown list.

Sometimes, however, certain options in the breadcrumb dropdown list are not applicable to the current resource being viewed, and clicking on one of these options will cause incorrect data to be displayed in the table. For example, if the user has selected the channel 'SEO', they should not be able to select the 'Shopping' resource from the dropdown list, as this resource applies to the 'PPC' channel only, and the data that is fetched will not be relevant to the breadcrumbs currently on display.

To exclude certain options from the dropdown list when particular channels or resources are being viewed, we can include them in the 'exclude breadcrumbs' configuration file:

export const excludeBreadcrumbsConfig = [
    {
        displayValues: [
            'Direct',
            'SEO',
            'Email',
            'Social Paid',
            'Social Organic',
            'Display'
        ],
        exclude: [
            'report-mcs-ppc',
            'report_mcs_shopping'
        ]
    }

In the example above, if the user has selected any of the channels listed in the displayValues array, the 'PPC' (Adwords) and 'Shopping' resources will be excluded from the breadcrumbs.

Having selected the channel 'Direct', 'PPC' and 'Shopping' resources have been excluded from the list.