This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 ); | |
/** | |
* Auto login to site after GF User Registration Form Submittal | |
* | |
*/ | |
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) { | |
wp_set_auth_cookie( $user_id, false, '' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this script after you make your dataLayer = []; call | |
// AND after your GTM code snippet | |
// This needs to go inside the header.php in order for it work globally across your site | |
<script type="text/javascript"> | |
// URL toolbox - helps grabbing elements in the URL | |
var _d = document; | |
var _dl = _d.location; | |
var _dlp = _dl.pathname; | |
var _dls = _dl.search; | |
var _dr = _d.referrer; |