WordPress database error: [Table 'gladiator_4.gla_wp_wf_sn_cf_bl_ips' doesn't exist]
SELECT tid FROM `gla_wp_wf_sn_cf_bl_ips` WHERE ip = '216.73.216.194'

WordPress database error: [Table 'gladiator_4.gla_wp_wf_sn_cf_bl_ips' doesn't exist]
SELECT tid FROM `gla_wp_wf_sn_cf_bl_ips` WHERE ip = '216.73.216.194'

About The Daily Gladiator – The Daily Gladiator
THE DAILY GLADIATOR

About The Daily Gladiator

This site was built to showcase the power of Riddle.com for news websites.

It focusses on things like Ad Delivery (video and text ads) and handling logged in users.

Getting users create accounts and log in is a key focus area for many publishers to increase retention, personalise content and increase ad revenue.

This site explains the key techniques used to create The Daily Gladiator

Logged in user status and the Riddle Data Layer

Riddles Data Layer allows me to pass data from my site to Riddle and later retrieve that data again combined with the Riddle data.

To pass information like username, user email and logged-in status (0 or 1) to Riddle, I created a new shortcode in my functions.php.

I can call that shortcode whereever I place a Riddle that requires this data. 

In Riddle, I used the project wide settings to set up unified data layer variables for logged-in status, user name and user email. That way my editors will never need to remember to add these variables to a Riddle. This is a feature of the Riddle Enterprise Plan.

Code Example

The code used to create the shortcode that grabs information from the logged-in user and passes it to the RIddle Data Layer. I have used the code provided on the Riddle Examples Page for Developers.

				
					//**push to Riddle datalayer shortcode**//
 
function riddle_datalayer_shortcode() {
    if ( is_user_logged_in() ) {
        $current_user = wp_get_current_user();
        $is_logged_in = '1';
        $display_name = esc_js( $current_user->display_name );
        $email = esc_js( $current_user->user_email );
    } else {
        $is_logged_in = '0';
        $display_name = '';
        $email = '';
    }

    return "<script>
        window.riddleDataLayer = window.riddleDataLayer || [];
        window.riddleDataLayer.push({ key: 'is_logged_in', value: '$is_logged_in' });
        window.riddleDataLayer.push({ key: 'display_name', value: '$display_name' });
        window.riddleDataLayer.push({ key: 'email', value: '$email' });
    </script>";
}
add_shortcode('riddle_datalayer', 'riddle_datalayer_shortcode');
				
			
Scroll to Top