Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def google_search_type(ref_type, label, path):
if ref_type == Referrer.Types.SEARCH and 'Google' in label:
return 'Google AdWords Referrer' if path.startswith('/aclk') or path.startswith('/pagead/aclk') else 'Organic Google Search'
else:
return 'Not Google Search'