Fix not add analytics if DEBUG=True
This commit is contained in:
		
					parent
					
						
							
								2ad984504c
							
						
					
				
			
			
				commit
				
					
						ebf8b0646d
					
				
			
		
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -8,8 +8,7 @@ def google_analytics(request):
 | 
			
		|||
    """
 | 
			
		||||
    host = request.get_host()
 | 
			
		||||
    ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_IDS', False).get(host)
 | 
			
		||||
    print(ga_prop_id)
 | 
			
		||||
    if ga_prop_id:
 | 
			
		||||
    if not settings.DEBUG and ga_prop_id:
 | 
			
		||||
        return {
 | 
			
		||||
            'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue