Franz92
Forum Replies Created
-
Hi!
My return for the 1st party cookie variable upon the orderComplete event is:"{\"consents\":{\"essential\":[\"borlabs-cookie\",\"google-tag-manage" + "r\",\"woocommerce\"],\"statistics\":[\"google-analytics\",\"hotjar\"" + "],\"marketing\":[\"facebook-pixel\",\"klaviyo\"]},\"domainPath\":\"b" + "engelmann.com/\",\"expires\":\"Tue, 04 Apr 2023 13:34:37 GMT\",\"uid" + "\":\"xftc0mgc-xg1rydxy-mrco30ac-rgzb7yd1\",\"version\":\"4\"}"For “Google Analytics Consent Status” upon the orderComplete event it is
trueI’ve used this for testing.
> What we could do is to test if we read the Borlabs consent cookie directly, does this give better data collection quality? If yes, I could contact them to propose a change in their variable template.
Does that help?
Coverage seems to be a lot better. It was 29% before, 51% now. (Still lower than what I am seeing on other sites, but a least better.)
Is there a way to check for “is empty”?
Hi!
Quite, but not close. If I understand it correctly your recommendation would cause all main images to be replaced be the clean images (even if empty), if a main image exists.I’d need to make it work the other way round:
– If a clean image url exists / is not empty
– then replace the main imageBut I am lacking the syntax. How do I check for exists / is not empty and how do I enter a dynamic instead of a static value? ( https://pasteboard.co/ubDllliWnfNM.png )
Oh, nope: I was confusing your plugin with another one. Yours doesn’t have the option to create custom fields. But you have rules.
Mhm. I’ll try using a custom attribute and a rule to solve this.
Update: Okay, I am getting stuck here. Here’s a screenshot: https://pasteboard.co/ubDllliWnfNM.png
I created a custom attribute that stores the URL to the clean image. What I want is the rule to check wether there’s a value and if yes, return that value instead of the original main image.
However, I neither know how to check for a value (there’s an “is empty”, but not “is not empty” argument), nor how to return the URL of the attribute.
Can you help, please?
I’ve read through those help documents, but couldn’t find an answer:
Hi,
I am dumb. Of course it’s possible, I’ll just have to create a new custom field via your plugin and drop the link in there.Then I will add a dynamic field and check wether that field has a value – and if not, fall back to the main image link.
And that dynamic field is what I parse to g:image_link. 🙂
Hi,
thank you!Quick note: You’ll have to use “catch (err)” instead of “except” in the second code sample:
function() { var c = {{Borlabs Cookie Value}}; try { var consent_status = JSON.parse(c); if ( consent_status.consents && consent_status.consents.statistics ) { return consent_status.consents.statistics.includes( "google-analytics" ); } } catch (err) { //something went wrong with JSON decode, perhaps cookie is empty or undefined } return undefined; // could be also false }So, using this my return for the 1st party cookie variable is:
"%7B%22consents%22%3A%7B%22essential%22%3A%5B%22borlabs-cookie%22%2C%" + "22google-tag-manager%22%2C%22woocommerce%22%5D%2C%22statistics%22%3A" + "%5B%22google-analytics%22%2C%22hotjar%22%5D%2C%22marketing%22%3A%5B%" + "22facebook-pixel%22%5D%7D%2C%22domainPath%22%3A%22bengelmann.com%2F%" + "22%2C%22expires%22%3A%22Tue%2C%2003%20Jan%202023%2013%3A48%3A07%20GM" + "T%22%2C%22uid%22%3A%225v5lah1s-rw2adhk8-2by5uhr6-4jyj5n8f%22%2C%22ve" + "rsion%22%3A%224%22%7D"Whereas I get ‘undefined’ for “Google Analytics Consent Status” upon the orderComplete event.
That surprises me. The consent for google-analytics seems to be given, so the return value shouldn’t be undefined.
Thanks! Will check that out and how to upgrade.
Hi Thomas,
I just re-read your answer and understand that I did misread it.What we could do is to test if we read the Borlabs consent cookie directly, does this give better data collection quality?
How would I do that?
Best,
FranzHi Thomas,
great to find the culprit, thanks! Gladly – they will be more than happy to find ways to make their plugin better.Hi Thomas,
thank you for taking a look. This is the link: https://tagassistant.google.com/#/?id=GTM-5LKBH46&url=https%3A%2F%2Fbengelmann.com%2F%3Fgtm_debug%3D1643211396259&source=TAG_MANAGER>m_auth=gUj-2FB3AFryFUDDQMFk8A>m_preview=env-46Yes, Thomas, that’s right.
How to place an order without paying:
[redacted by moderator]
Please use as a city TESTING GOOGLE ANALYTICS UDPATE, so that the ERP catches and deletes it.
Thank you!
- This reply was modified 4 years, 3 months ago by Steven Stern (sterndata).
Gladly!
– 57% accept the marketing cookies
– 9 unique order-received pages
– 3 transactions conuntedThe transaction IDs and order numbers don’t match up, though – we are passing order numbers instead of woocommerces’ own transaction IDs.
Hi, 57% accept the marketing cookies. Less than I thought, but still 50% more than tracked transactions. 🤔
Hi @duracelltomi ,
I am afraid my joy was too early. The integration picks up some of the transaction events, but only 35% of the total number of transactions. I am at a loss at what could be wrong. I’ve followed all the directions. Especially only *some* transactions making it through confuses me!This is the current debugging link: https://tagassistant.google.com/#/?id=GTM-5LKBH46&url=https%3A%2F%2Fbengelmann.com%2F%3Fgtm_debug%3D1642415240479&source=TAG_MANAGER>m_auth=gUj-2FB3AFryFUDDQMFk8A>m_preview=env-46
Hi Thomas,
thank you for your help and the updates.I have since removed trigger groups and used borlabs tutorial to set up tracking for Google Analytics and Facebook correctly today. I am excited to see if that does the trick!
I have also removed the parallel tracking via the Google Analytics for WooCommerce plugin, so now all tracking happens via GTM4WP.
I’ll report back to tomorrow and let you know if it works. 🙂