Configure cross domain tracking with Google Tag Manger is much more easier now.
- Open up Google Tag Manager and Choose your Container.
- Chose your Google Analytics Tag (If you are not using Google Tag Manger to deploy your analytics tag you should migrate it over).
- Click Configure Tag Section
- Choose Advanced Settings
- Click Field to Set
- Under Field Name, choose allowLinker and under value, type true.
- Next Go to Cross Domain Tracking, add your two domains, i.e. domainA.com, domainB.com
- Under Hash Delimiter, leave False and Under Decorate Forms, leave False.
After setting the allowLinker field, you can set the cross domain tracking for the two domains that are needed.