Command ignored. Unknown target: undefined when setting Custom Dimension in Google Analytics tracking code

You need to use your tracker names in the "set" command, else GA will apply the command to the default tracker t0 (which does not exist in your example):

  ga('crmpiccoglobal.set', 'dimension1', 'premium');
  ga('crmpiccoregion.set', 'dimension1', 'premium');

  ga('crmpiccoglobal.send', 'pageview');
  ga('crmpiccoregion.send', 'pageview');

If you use Google Tag Manager to load your Google Analytics and you don't know what tracker is being created, use this:

sendGa(name : string, data: any) {
    (<any>window).ga(() => {
        const trackers = (<any>window).ga.getAll();
        const firstTracker = trackers[0];
        const trackerName = firstTracker.get('name');
        (<any>window).ga(trackerName + '.' + name, data);
    });
}

docs: https://developers.google.com/analytics/devguides/collection/analyticsjs/accessing-trackers