Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Str Str TupleLoad Str Str TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body With Call NameLoad keyword NameLoad body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad With Call NameLoad keyword NameLoad body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call NameLoad Dict Str NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad keyword ListLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad decorator_list Call NameLoad keyword Str keyword NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad Call NameLoad attr NameLoad decorator_list decorator_list Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad
N/A N/A 
Tests for the Google Analytics template tags and filters.
 django.http HttpRequest django.template Context django.test.utils override_settings analytical.templatetags.google_analytics GoogleAnalyticsNode TRACK_SINGLE_DOMAIN TRACK_MULTIPLE_DOMAINS TRACK_MULTIPLE_SUBDOMAINS SCOPE_VISITOR SCOPE_SESSION SCOPE_PAGE analytical.tests.utils TestCase TagTestCase analytical.utils AnalyticalException GoogleAnalyticsTagTestCase N/A TagTestCase N/A N/A 
    Tests for the ``google_analytics`` template tag.
     test_tag N/A N/A self N/A N/A N/A r N/A N/A self render_tag google_analytics google_analytics N/A N/A N/A self assertTrue N/A _gaq.push(['_setAccount', 'UA-123456-7']); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_trackPageview']); r r N/A test_node N/A N/A self N/A N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A _gaq.push(['_setAccount', 'UA-123456-7']); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_trackPageview']); r r N/A test_no_property_id N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException GoogleAnalyticsNode N/A N/A override_settings GOOGLE_ANALYTICS_PROPERTY_ID None test_wrong_property_id N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException GoogleAnalyticsNode N/A N/A override_settings GOOGLE_ANALYTICS_PROPERTY_ID wrong test_track_multiple_subdomains N/A N/A self N/A N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A _gaq.push(['_setDomainName', 'example.com']); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_setAllowHash', false]); r r N/A N/A override_settings GOOGLE_ANALYTICS_TRACKING_STYLE TRACK_MULTIPLE_SUBDOMAINS GOOGLE_ANALYTICS_DOMAIN example.com test_track_multiple_domains N/A N/A self N/A N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A _gaq.push(['_setDomainName', 'example.com']); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_setAllowHash', false]); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_setAllowLinker', true]); r r N/A N/A override_settings GOOGLE_ANALYTICS_TRACKING_STYLE TRACK_MULTIPLE_DOMAINS GOOGLE_ANALYTICS_DOMAIN example.com test_custom_vars N/A N/A self N/A N/A N/A context N/A Context N/A google_analytics_var1 google_analytics_var2 google_analytics_var4 google_analytics_var5 N/A test1 foo N/A test2 bar SCOPE_VISITOR N/A test4 baz SCOPE_SESSION N/A test5 qux SCOPE_PAGE N/A r N/A N/A N/A GoogleAnalyticsNode render context N/A N/A N/A self assertTrue N/A _gaq.push(['_setCustomVar', 1, 'test1', 'foo', 3]); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_setCustomVar', 2, 'test2', 'bar', 1]); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_setCustomVar', 4, 'test4', 'baz', 2]); r r N/A N/A N/A self assertTrue N/A _gaq.push(['_setCustomVar', 5, 'test5', 'qux', 3]); r r N/A test_track_page_load_time N/A N/A self N/A N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A _gaq.push(['_trackPageLoadTime']); r r N/A N/A override_settings GOOGLE_ANALYTICS_SITE_SPEED True test_display_advertising N/A N/A self N/A N/A N/A N/A override_settings GOOGLE_ANALYTICS_DISPLAY_ADVERTISING False N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A google-analytics.com/ga.js r r N/A N/A override_settings GOOGLE_ANALYTICS_DISPLAY_ADVERTISING True N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A stats.g.doubleclick.net/dc.js r r N/A test_render_internal_ip N/A N/A self N/A N/A N/A req N/A HttpRequest N/A N/A N/A req META N/A REMOTE_ADDR 1.1.1.1 N/A context N/A Context N/A request req N/A r N/A N/A N/A GoogleAnalyticsNode render context N/A N/A N/A self assertTrue N/A N/A r startswith <!-- Google Analytics disabled on internal IP address r N/A N/A N/A self assertTrue N/A N/A r endswith --> r N/A N/A override_settings ANALYTICAL_INTERNAL_IPS N/A 1.1.1.1 test_anonymize_ip N/A N/A self N/A N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertTrue N/A _gaq.push (['_gat._anonymizeIp']); r r N/A N/A override_settings GOOGLE_ANALYTICS_ANONYMIZE_IP True test_anonymize_ip_not_present N/A N/A self N/A N/A N/A r N/A N/A N/A GoogleAnalyticsNode render N/A Context N/A N/A N/A self assertFalse N/A _gaq.push (['_gat._anonymizeIp']); r r N/A N/A override_settings GOOGLE_ANALYTICS_ANONYMIZE_IP False N/A N/A override_settings GOOGLE_ANALYTICS_PROPERTY_ID UA-123456-7 GOOGLE_ANALYTICS_TRACKING_STYLE TRACK_SINGLE_DOMAIN NoDomainTestCase N/A TestCase N/A test_exception_without_domain N/A N/A self N/A N/A N/A context N/A Context N/A N/A N/A self assertRaises AnalyticalException N/A N/A GoogleAnalyticsNode render context N/A N/A N/A override_settings GOOGLE_ANALYTICS_PROPERTY_ID UA-123456-7 GOOGLE_ANALYTICS_TRACKING_STYLE TRACK_MULTIPLE_DOMAINS GOOGLE_ANALYTICS_DOMAIN None ANALYTICAL_DOMAIN None