# # bounce_rate snapon # # This snapon computes the bounce rate, i.e., the number of bounces divided by the number of sessions. # This snapon computes the bounces by attaching the bounces snapon, and computes the ratio by attaching # an instance of the report_field_ratio snapon. # bounce_rate = { version = "1.0.3" # 2012-??-?? - GMF - 1.0 - Initial creation # 2012-05-01 - GMF - 1.0.1 - Fixed label for bounce_rate_field_name # 2013-03-23 - GMF - 1.0.2 - Fixed extra closing curly, which caused the snapon to do nothing at all # 2013-06-13 - GMF - 1.0.3 - Turned off default graphs in every report label = "$lang_admin.snapons.bounce_rate.label" comment = "$lang_admin.snapons.bounce_rate.comment" config_snapon_category = "" parameters = { bounce_rate_field_name = { parameter_value = "$lang_admin.snapons.bounce_rate.parameters.bounce_rate_field_name.parameter_value" validation_type = "field_label" validate_field_label_for = { database_fields = true report_fields = true } form_element_label = "$lang_admin.snapons.bounce_rate.parameters.bounce_rate_field_name.form_element_label" form_element_type = "text" form_element_width = "380" description = "$lang_admin.snapons.bounce_rate.parameters.bounce_rate_field_name.description" } # bounce_rate_field_name # bounces_field = { # # parameter_value = "bounces" # validation_type = "string" # # form_element_label = "$lang_admin.snapons.bounce_rate.parameters.bounces_field.form_element_label" # form_element_type = "select" # select_options_source = "database_fields" # # description = "" # # } # bounces_field sessions_field = { parameter_value = "sessions" validation_type = "string" form_element_label = "$lang_admin.snapons.bounce_rate.parameters.sessions_field.form_element_label" form_element_type = "select" select_options_source = "database_fields" description = "" } # sessions_field } # parameters parameters_form = { group_1 = { description = "$lang_admin.snapons.bounce_rate.parameters_form.group_1.description" parameters = { bounce_rate_field_name = true # bounces_field = true sessions_field = true } # parameters } # group 1 } # parameters_form attach_operations = { # Attach the bounces snapon, which computes bounces add_bounces_snapon = { type = "add_snapons" snapons = { bounces = { snapon = "bounces" name = "bounces_instance" label = "$lang_admin.snapons.bounces.label" parameters = { bounces_field_name.parameter_value = "$lang_admin.snapons.bounces.parameters.bounces_field_name.parameter_value" bounces_field_name.final_node_name = "bounces" session_entrances_field.parameter_value = "session_entrances" session_exits_field.parameter_value = "session_exits" } # parameters } # bounces } # snapons } # add_bounces_snapon # Attach the field_ratio snapon, which computes bounce rate from bounces / sessions add_ratio_snapon = { type = "add_snapons" snapons = { bounce_rate_report_field_ratio = { snapon = "report_field_ratio" name = "bounce_rate_report_field_ratio" label = "$lang_admin.snapons.bounce_rate.label (report field)" parameters = { ratio_field = { final_node_name = "{= @parameters{'bounce_rate_field_name'}{'final_node_name'} =}" parameter_value = "{= @parameters{'bounce_rate_field_name'}{'parameter_value'} =}" } numerator_field.parameter_value = "bounces" denominator_field.parameter_value = "{= @parameters{'sessions_field'}{'parameter_value'} =}" display_format_type.parameter_value = "{x= format((v * 100.0), 'two_digit_fixed') . '%' =x}" } # parameters } # bounce_rate } # snapons } # add_ratio_snapon } # attach_operations } # bounce_rate